projects
/
naja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd20e18
)
ClearBits action
author
Stefano Rivera
<stefano@rivera.za.net>
Sat, 17 May 2014 17:42:43 +0000
(19:42 +0200)
committer
Stefano Rivera
<stefano@rivera.za.net>
Sat, 17 May 2014 17:42:51 +0000
(19:42 +0200)
naja/actions.py
patch
|
blob
|
history
diff --git
a/naja/actions.py
b/naja/actions.py
index c96a219a6ec28e9382d0abc81c88d8736f7498b1..dc8f3e6af74077bd8afdd58028b270af07030e80 100644
(file)
--- a/
naja/actions.py
+++ b/
naja/actions.py
@@
-98,6
+98,14
@@
class SetBits(LocationAction):
board.player.bits.set_bits(location.bitwise_operand)
+class ClearBits(LocationAction):
+ TEXT = "Clear %(location_bits)s."
+ GLYPHS = (ACTION_GLYPHS.CLEAR_BITS,)
+
+ def perform_action(self, board, location):
+ board.player.bits.clear_bits(location.bitwise_operand)
+
+
class ToggleBits(LocationAction):
TEXT = "Toggle %(location_bits)s."
GLYPHS = (ACTION_GLYPHS.TOGGLE_BITS,)