 
 			if charCode > 0
 				charPretty = if 32 <= charCode <= 126
-					@con2d.font = @FONTS.NORMAL
+					@con2d.font = FONTS.NORMAL
 					charRaw
 				else
-					@con2d.font = @FONTS.SMALL
+					@con2d.font = FONTS.SMALL
 					"##{charCode}"
 
 				@con2d.fillText(


Grid::draw = ->
	#background
	@con2d.fillStyle = @COLORS.BACKGROUND
	@con2d.fillRect 0, 0, @canvas.width, @canvas.height

	#active path
	@con2d.fillStyle = @COLORS.PATHBACKGROUND
	@highlightedPath?.list.forEach (entry) =>
		@con2d.fillRect entry.x * @cellSize, entry.y * @cellSize, @cellSize, @cellSize

	#chars
	@con2d.fillStyle = @COLORS.FONT
	for i in [0...@playfield.width]
		for j in [0...@playfield.height]
			charRaw = @playfield.getAt i, j

'use strict'

COLORS =
	BACKGROUND: '#272822'
	PATHBACKGROUND: '#49483E'
	GRID: '#EDF'
	PATHINDICATOR: 'rgb(24, 155, 230)'
	FONT: '#EDF'

FONTS =
	NORMAL: '20px Consolas, monospace'
	SMALL: '14px Consolas, monospace'

Grid = (@playfield, @pathSet, @canvas) ->
	@cellSize = 36

	@canvas.width = @playfield.width * @cellSize
	@canvas.height = @playfield.height * @cellSize
