changed the drawing logic in the game.