Implemented complete game logic in game rules module. Closes #25.