projects
/
naja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b423690
)
Add parse_bits to utils.
author
Simon Cross
<hodgestar@gmail.com>
Sat, 17 May 2014 17:46:59 +0000
(19:46 +0200)
committer
Simon Cross
<hodgestar@gmail.com>
Sat, 17 May 2014 17:48:56 +0000
(19:48 +0200)
naja/utils.py
patch
|
blob
|
history
diff --git
a/naja/utils.py
b/naja/utils.py
index b15302a1bb01effb9e2a991b843654ea91c8aee0..d5d17cc6067276a8649369c625893872388760fe 100644
(file)
--- a/
naja/utils.py
+++ b/
naja/utils.py
@@
-27,6
+27,11
@@
def move_glyph(move_name):
}.get(move_name, move_name.lower())
+def parse_bits(bit_list):
+ # Convert names to numbers if applicable.
+ return frozenset(BITS.get(bit, bit) for bit in bit_list)
+
+
def warp_to_game_state(game_state):
from naja.events import LoadGameEvent, SceneChangeEvent
from naja.scenes.game import GameScene