First attempt to implement some game logic