Add export methdo to DoNothing action for testing purposes
authorNeil <neil@dip.sun.ac.za>
Sun, 11 May 2014 20:15:47 +0000 (22:15 +0200)
committerNeil <neil@dip.sun.ac.za>
Sun, 11 May 2014 20:16:52 +0000 (22:16 +0200)
naja/actions.py

index 5599bd73b2d724e6986bc8a58d3ecf7e3ba2da16..9e3e5c3a4cb0b68c974f9c42321984deab3bc488 100644 (file)
@@ -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."