From 2208db6c69d2dbf05dfd65772a01da2af6553172 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 12 May 2014 11:01:17 +0200 Subject: [PATCH] better action export --- naja/actions.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/naja/actions.py b/naja/actions.py index 5a3e6e4..2b4d212 100644 --- a/naja/actions.py +++ b/naja/actions.py @@ -26,7 +26,9 @@ class LocationAction(object): return False def export(self): - raise NotImplementedError("TODO") + return {'required_bits': list(self.required_bits), + 'data': self.data, + 'action_class': self.__class__.__name__} class DoNothing(LocationAction): @@ -35,10 +37,6 @@ class DoNothing(LocationAction): def perform_action(self, board, location): pass - def export(self): - return {'required_bits': list(self.required_bits), - 'action_class': 'DoNothing'} - class LoseHealthOrMSB(LocationAction): TEXT = "Lose health. If MSB is set, it will be cleared instead." -- 2.34.1