learning game logic