1

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.

technillogue
  • 1,482
  • 3
  • 16
  • 27

3 Answers3

0

Would CompletedAction, FinishedAction, ClosedAction, or PastAction be of any use?

Elliot Bonneville
  • 51,872
  • 23
  • 96
  • 123
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