Code needs heavy refactoring, but the game is almost playable.