Game logic implementation