First rough implementation of game logic