Guest User

Init

a guest
Jan 24th, 2012
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import Data.Array
  2.  
  3. type Index = (Int,Int)
  4. data Piece = Black | White | Blank deriving (Show, Eq)
  5. type Board = Array Index Piece
  6.  
  7. -- constructs a new Board with every space set to Blank
  8. emptyBoard :: Board
  9. emptyBoard = listArray ((0,0),(7,7)) (cycle [Blank])
Advertisement
Add Comment
Please, Sign In to add comment