projects
/
naja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f1d3b6
)
Add export methdo to DoNothing action for testing purposes
author
Neil
<neil@dip.sun.ac.za>
Sun, 11 May 2014 20:15:47 +0000
(22:15 +0200)
committer
Neil
<neil@dip.sun.ac.za>
Sun, 11 May 2014 20:16:52 +0000
(22:16 +0200)
naja/actions.py
patch
|
blob
|
history
diff --git
a/naja/actions.py
b/naja/actions.py
index 5599bd73b2d724e6986bc8a58d3ecf7e3ba2da16..9e3e5c3a4cb0b68c974f9c42321984deab3bc488 100644
(file)
--- a/
naja/actions.py
+++ b/
naja/actions.py
@@
-25,6
+25,9
@@
class LocationAction(object):
else:
return False
+ def export(self):
+ raise NotImplementedError("TODO")
+
class DoNothing(LocationAction):
TEXT = "No effect."
@@
-32,6
+35,10
@@
class DoNothing(LocationAction):
def perform_action(self, board, location):
pass
+ def export(self):
+ return {'required_bits': list(self.required_bits),
+ 'action_class': 'DoNothing'}
+
class LoseHeathOrMSB(LocationAction):
TEXT = "Lose health. If MSB is set, it will be cleared instead."