-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathisland.py
48 lines (44 loc) · 977 Bytes
/
island.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
from dataclasses import dataclass
from random_gen import RandomGen
# Islands can have names other than this. This is just used for random generation.
ISLAND_NAMES = [
"Dawn Island",
"Shimotsuki Village",
"Gecko Islands",
"Baratie",
"Conomi Islands",
"Drum Island",
"Water 7"
"Ohara",
"Thriller Bark",
"Fish-Man Island",
"Zou",
"Wano Country",
"Arabasta Kingdom",
# 13 🌞 🏃♀️
"Loguetown",
"Cactus Island",
"Little Garden",
"Jaya",
"Skypeia",
"Long Ring Long Land",
"Enies Lobby",
"Sabaody Archipelago",
"Impel Down",
"Marineford",
"Punk Hazard",
"Dressrosa",
"Whole Cake Island",
]
@dataclass
class Island:
name: str
money: float
marines: int
@classmethod
def random(cls):
return Island(
RandomGen.random_choice(ISLAND_NAMES),
RandomGen.random() * 500,
RandomGen.randint(0, 300),
)