Added main logic of the game