Added a function to update the game's logic.

This procedure essentially handles the back-end of the game, updating
game logic such as AI, sounds, e.t.c.