create game state drawing code