 class Board
 	# fill in with peices
 	board =
-	for x in [1..8]
-		for y in [1..8]
-			new BlankPiece
+	for x in [0..7]
+		for y in [0..7]
+			# if x+y % 2 == 0 then it's a white square
+			new BlankPiece (x + y) % 2 == 0
 
 	# these work with either algebraic notation or x,y coordinates
 	set: (pos..., to) ->

#console.log xyToan 1, 8

myBoard = new Board
myBoard.set("a2", new Knight)
myBoard.set(1,1, new King)
console.log myBoard.get(1,2)
console.log myBoard.get("a1")

#myPiece = new Pawn
#console.log myPiece.pointValue()


# eventually Piece should have a canMove
class Piece
	constructor: (@isWhite) ->
		@color = if @isWhite then 'white' else 'black'
		@symbol = if @isWhite then @whiteSymbol else @blackSymbol

	type: ->
		@name

