diff options
author | Aineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi> | 2024-01-25 15:52:28 +0200 |
---|---|---|
committer | Aineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi> | 2024-01-25 15:52:28 +0200 |
commit | 27057a601c43ab5a6dcaa5b396c6b3d891c921b9 (patch) | |
tree | 576348f7c7f25b6a6c7283be29a23aa08e6d1688 /board/static.py | |
parent | 84ff4aa8fc7714b5841097e0dd800085982321e4 (diff) |
Sorting out import situation and making enum names for tiles for readability.
Diffstat (limited to 'board/static.py')
-rw-r--r-- | board/static.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/board/static.py b/board/static.py new file mode 100644 index 0000000..eea30fd --- /dev/null +++ b/board/static.py @@ -0,0 +1,34 @@ +""" board/static.py - määrittelyjä pelilaudan muuttumattomille asoille """ + +from enum import Enum, IntEnum + +class Level(Enum): + """ vaikeustasot """ + BEGINNER = 0 + INTERMEDIATE = 1 + EXPERT = 2 + + +class Tile(IntEnum): + """ alueiden selitteet """ + BLANK = 0 + ONE = 1 + TWO = 2 + THREE = 3 + FOUR = 4 + FIVE = 5 + SIX = 6 + SEVEN = 7 + EIGHT = 8 + BOMB = 9 + FLAG_BOMB = 10 + FLAG_FREE = 11 + UNOPENED = 12 + FLAG_UNKNOWN = 13 + + +LevelSpecs = { + Level.BEGINNER: ( 9, 9, 10 ), + Level.INTERMEDIATE: ( 15, 15, 40 ), + Level.EXPERT: ( 30, 16, 99 ) +} |