generated from PeterJCLaw/template-compstate
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
698 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from __future__ import annotations | ||
|
||
from typing import TypedDict | ||
|
||
|
||
class RawDistrict(TypedDict): | ||
# Single pallet colour character | ||
highest: str | ||
# Pallet colour -> count | ||
pallets: dict[str, int] | ||
|
||
|
||
DISTRICT_SCORE_MAP = { | ||
'outer_nw': 1, | ||
'outer_ne': 1, | ||
'outer_se': 1, | ||
'outer_sw': 1, | ||
'inner_nw': 2, | ||
'inner_ne': 2, | ||
'inner_se': 2, | ||
'inner_sw': 2, | ||
'central': 3, | ||
} | ||
|
||
DISTRICTS_NO_HIGH_RISE = frozenset([ | ||
'outer_nw', | ||
'outer_ne', | ||
'outer_se', | ||
'outer_sw', | ||
]) | ||
|
||
DISTRICTS = DISTRICT_SCORE_MAP.keys() | ||
|
||
assert DISTRICTS_NO_HIGH_RISE < DISTRICTS | ||
|
||
ZONE_COLOURS = ( | ||
'G', # zone 0 = green | ||
'O', # zone 1 = orange | ||
'P', # zone 2 = purple | ||
'Y', # zone 3 = yellow | ||
) |
Oops, something went wrong.