In my game, there is are ActionFactory (makes AbstractActions), AbstractAction (actions that could exist), PotentialAction (actions that a being could do, which are assosietted with a specific being) classes. I need a name for a class that reperessents an actual, choosen action which was done by a specific being, has specific targets, and possibly arguments.
Asked
Active
Viewed 86 times
1
-
1Can you provide more details on how the actions will be used/consumed? – Omar Mar 09 '12 at 03:07
-
@Omar: After some delay (possibly none), they would be executed, with some effect. – technillogue Mar 09 '12 at 14:12
3 Answers
0
Would CompletedAction, FinishedAction, ClosedAction, or PastAction be of any use?

Elliot Bonneville
- 51,872
- 23
- 96
- 123
-
-
1Ah, I see. Perhaps 'SelectedAction' or 'ChosenAction', then? Those imply that an action has been selected but not necessarily carried out or completed yet. – Elliot Bonneville Mar 09 '12 at 03:05
0
Without more information about the actions and how they work, all I can say is it seems your actions are all the same but have different properties.
How are the actions handled after they're returned from the factory? Are they passed to the being
and then run?
Maybe a factory isn't the best option for what you're trying to do and the categorization of the action type is better placed as a property on the class.
My Python is a bit rusty, but something like this:
class action(object):
executeTime = None
targets = []
arguments = []
def actionType():
if executeTime = None:
return "Potential"
else if executeTime < datetime.now():
return "Complete"
else executeTime > datetime.now():
return "Potential"

Omar
- 39,496
- 45
- 145
- 213
0
I went with RealAction, mainly because of API consistency - all actual, specific real-world classes are prefixed with Real (and have an associated Potential class)

technillogue
- 1,482
- 3
- 16
- 27