Moving logic out of routes
Allows making a move only when game is not over