Fully working game logic in command line.