First wokring iteration of the game.