refactor to keep currentAction independent of game