-
Notifications
You must be signed in to change notification settings - Fork 1
/
Tile.py
29 lines (27 loc) · 881 Bytes
/
Tile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class Portal:
# very simple class to define a portal as an object
files = [
"images/portals/portalBurgundy.png",
"images/portals/portalCyan.png",
"images/portals/portalGreen.png",
"images/portals/portalRed.png",
"images/portals/portalYellow.png",
]
def __init__(self, origin, dest, image=None):
self.origin = origin;
self.destination = dest;
self.image = image
class Tile():
# Things declared here are considered *class* variables
# CLASS VARIABLES ARE SHARED BY ALL INSTANCES
# SERIOUSLY PYTHON!?!?!? SERIOUSLY!?!??!
# players = [];
# tileNumber = 0;
# portal = -1;
# constructor
def __init__(self, number):
# things defined here are
# *INSTANCE* variables!!!!!
self.players = [];
self.tileNumber = number;
self.portal = None;