-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtile.py
More file actions
41 lines (32 loc) · 838 Bytes
/
tile.py
File metadata and controls
41 lines (32 loc) · 838 Bytes
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
30
31
32
33
34
35
36
37
38
39
40
41
import json
class Tile:
def __init__(self):
self.color = None
self.desc = None
self.uniq = None
self.explored = False
def bathys_repr(self):
return {
"color": self.color,
"desc": self.desc,
"uniq": self.uniq,
"explored": self.explored,
}
class OpenTile(Tile):
def __init__(self):
super().__init__()
self.desc = "Open Water"
self.uniq = "open"
self.color = "#1A73E8"
class CoralTile(Tile):
def __init__(self):
super().__init__()
self.desc = "Coral Reef"
self.uniq = "coral"
self.color = "#F87661"
class RockTile(Tile):
def __init__(self):
super().__init__()
self.desc = "Rock"
self.uniq = "rock"
self.color = "#989898"