Skip to content

Instantly share code, notes, and snippets.

@ignaciomosca
Created November 25, 2019 22:24
Show Gist options
  • Save ignaciomosca/a29353c32c88c2edf27032c5e2252fe7 to your computer and use it in GitHub Desktop.
Save ignaciomosca/a29353c32c88c2edf27032c5e2252fe7 to your computer and use it in GitHub Desktop.
data PieceType = Rook | Bishop | Knight | Queen | King deriving(Show, Eq, Ord)
data ChessPiece = Piece {row:: !Int, col:: !Int, piece:: PieceType} deriving(Eq, Ord)
data Board = Board{m:: !Int, n:: !Int, usedPieces:: Set ChessPiece , numberOfPieces:: !Int} deriving(Eq, Ord)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment