implemented rudimentary game logic and necessary database queries