 
 # 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
 

class BlankPiece extends Piece
	name: ""
	value: 0

class Pawn extends Piece
	name: "Pawn"
	value: 1

class Bishop extends Piece
	name: "Bishop"
	value: 3

class Knight extends Piece
	name: "Knight"
	value: 3

class Rook extends Piece
	name: "Rook"
	value: 5

class Queen extends Piece
	name: "Queen"
	value: 9

class King extends Piece
	name: "King"
	value: 137





		return board[x][y]

	visual: ->
		for x in [0..7]
			for y in [0..7]
				@get(x,y).symbol

	# draw the board to the console
	log: ->
		console.log "Current Board:"
		vis = @visual()
		for piece in vis
			console.log piece.join(' ')




