 	@con2d.save()
 	@con2d.translate 0.5, 0.5
 
-	@con2d.strokeStyle = @COLORS.GRID
+	@con2d.strokeStyle = COLORS.GRID
 	@con2d.beginPath()
 	for i in [1...@playfield.width]
 		@con2d.moveTo i * @cellSize, 0


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
