-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathworld.py
117 lines (108 loc) · 4.69 KB
/
world.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
CONNECT = """
Alaska--Northwest Territories--Alberta--Alaska
Alberta--Ontario--Greenland--Northwest Territories
Greenland--Quebec--Ontario--Eastern United States--Quebec
Alberta--Western United States--Ontario--Northwest Territories
Western United States--Eastern United States--Mexico--Western United States
Venezuala--Peru--Argentina--Brazil
Peru--Brazil--Venezuala
North Africa--Egypt--East Africa--North Africa
North Africa--Congo--East Africa--South Africa--Congo
East Africa--Madagascar--South Africa
Indonesia--Western Australia--Eastern Australia--New Guinea--Indonesia
Western Australia--New Guinea
Iceland--Great Britain--Western Europe--Southern Europe--Northern Europe--Western Europe
Northern Europe--Great Britain--Scandanavia--Northern Europe--Ukraine--Scandanavia--Iceland
Southern Europe--Ukraine
Middle East--India--South East Asia--China--Mongolia--Japan--Kamchatka--Yakutsk--Irkutsk--Kamchatka--Mongolia--Irkutsk
Yakutsk--Siberia--Irkutsk
China--Siberia--Mongolia
Siberia--Ural--China--Afghanistan--Ural
Middle East--Afghanistan--India--China
Mexico--Venezuala
Brazil--North Africa
Western Europe--North Africa--Southern Europe--Egypt--Middle East--East Africa
Southern Europe--Middle East--Ukraine--Afghanistan--Ural
Ukraine--Ural
Greenland--Iceland
Alaska--Kamchatka
South East Asia--Indonesia
"""
AREAS = {
"North America": (5, ["Alaska", "Northwest Territories", "Greenland", "Alberta", "Ontario", "Quebec", "Western United States", "Eastern United States", "Mexico"]),
"South America": (2, ["Venezuala", "Brazil", "Peru", "Argentina"]),
"Africa": (3, ["North Africa", "Egypt", "East Africa", "Congo", "South Africa", "Madagascar"]),
"Europe": (5, ["Iceland", "Great Britain", "Scandanavia", "Ukraine", "Northern Europe", "Western Europe", "Southern Europe"]),
"Asia": (7, ["Middle East", "Afghanistan", "India", "South East Asia", "China", "Mongolia" ,"Japan", "Kamchatka" ,"Irkutsk", "Yakutsk", "Siberia", "Ural"]),
"Australia": (2, ["Indonesia", "New Guinea", "Eastern Australia", "Western Australia"])
}
MAP = """
aa bbbb b cccccc pp tB B BCCCCCDDDDDDDDFFFF
aaaaaaabbbbbbbbbb cccc ppptt tttBBBBBCCCCCDDDDDDDFFFFFFFFFFF
aaaaaaabbbbbbbbbbb ccc nnn pp pttttttBBBBBCCCCCDDDDDFFFFFFFFFFFF F
aaaaaaaaddddddde fff c o pp tttttttBBBBBCCCEEEEEEEFFFFFFFFFF
a adddddddeee fff oo p rtttttttBBBBBCCEEEEEEEEFFF F
adddddddeeeefffff ooo rrrrtttttGGGGBBBCCEEEEHHHHHFFF
ddddddeeeeffff f qqrrrrtttttGGGGGGBIIIIHHHHHHHHH
ggggggghh ffff qqsssss ttt GGGGGGIIIIIHHHHHHHH
ggggggghhhhh qqq ss ss tt GGGGGGIIIIIIIIIII J
gggggghhhh qq s ssAAAAAAKKKGGIIIIIIIII I JJ
gggghhhhhh uuuu AAAAAKKKKKKIIIIIIII JJ
ggghhh h uuuuuuvvvvAAA AKKKKKKKIIIIIII J
ii uuuuuuuvvvv AAAA KKKKKKLLLLII
ii uuuuuuuvvvvv AAA KKKK LLLL
iii uuuuuuuuwwww AA KK LLL
iiijj uuuuuuuuwwwww K L M
jjjjj uuuuuuxxwwwww K M MM NN
kjjjmmmm uxxwww MMMM NNNN
kkmmmmmmmm xxxwww N
kkkmmmmm xxxyyy zz PPPP
lkkmmmm yyyyy z OOPPPPP
lllll yyyy z OOOOOPPPP
llll yyy OOOOPPPP
lll yy OO PPPP
"""
KEY = {
"a": "Alaska",
"b": "Northwest Territories",
"c": "Greenland",
"d": "Alberta",
"e": "Ontario",
"f": "Quebec",
"g": "Western United States",
"h": "Eastern United States",
"i": "Mexico",
"j": "Venezuala",
"k": "Peru",
"l": "Argentina",
"m": "Brazil",
"n": "Iceland",
"o": "Great Britain",
"p": "Scandanavia",
"q": "Western Europe",
"r": "Northern Europe",
"s": "Southern Europe",
"t": "Ukraine",
"u": "North Africa",
"v": "Egypt",
"w": "East Africa",
"x": "Congo",
"y": "South Africa",
"z": "Madagascar",
"A": "Middle East",
"B": "Ural",
"C": "Siberia",
"D": "Yakutsk",
"E": "Irkutsk",
"F": "Kamchatka",
"G": "Afghanistan",
"H": "Mongolia",
"I": "China",
"J": "Japan",
"K": "India",
"L": "South East Asia",
"M": "Indonesia",
"N": "New Guinea",
"O": "Western Australia",
"P": "Eastern Australia",
}