In my mind, the player has to select which unit to perform an action on.
That target would be stored as state info in your game engine. Then your
attack() callback simply chooses the attack action, and the game engine has
the info it needs to execute the turn: player->attacking->target.

Gumm

Reply via email to