Series: haskell
haskell
47 lines
· Updated 2026-02-03
Chess.hs
haskell/Chess.hs
module Chess where
import ChessGraphics
data PieceType = King | Queen | Knight | Bishop | Rook | Pawn
deriving (Eq, Show)
data Colour = White | Black
deriving (Eq, Show)
data Piece = Piece Colour PieceType
deriving (Eq, Show)
-- Part 0
blackSquare :: Picture
blackSquare = undefined
backRankPieces :: Picture
backRankPieces = undefined
-- Part 1
piecePicture :: Piece -> Picture
piecePicture = undefined
-- Part 2
repeatH :: Picture -> Int -> Picture
repeatH = undefined
repeatV :: Picture -> Int -> Picture
repeatV = undefined
board :: Picture
board = undefined
-- Part 3
combineH :: [Picture] -> Picture
combineH = undefined
combineV :: [Picture] -> Picture
combineV = undefined
type Position = (Int, Int) -- row,column
type GameState = [(Position,Piece)]
-- backdropFor :: Position -> Picture
-- piecePictureFor :: GameState -> Position -> Maybe Picture
boardFor :: GameState -> Picture
boardFor = undefined
Related articles
haskell
haskell
Updated 2026-02-03
Adding.hs
Adding.hs — haskell source code from the haskell learning materials (haskell/Adding.hs).
Read article →
haskell
haskell
Updated 2026-02-03
Area.hs
Area.hs — haskell source code from the haskell learning materials (haskell/Area.hs).
Read article →
haskell
haskell
Updated 2026-02-03
ChessGraphics.hs
ChessGraphics.hs — haskell source code from the haskell learning materials (haskell/ChessGraphics.hs).
Read article →
haskell
haskell
Updated 2026-02-03
Examples.hs
Examples.hs — haskell source code from the haskell learning materials (haskell/Examples.hs).
Read article →
haskell
haskell
Updated 2026-02-03
Fibonacci.hs
Fibonacci.hs — haskell source code from the haskell learning materials (haskell/Fibonacci.hs).
Read article →
haskell
haskell
Updated 2026-02-03
GPACalculator.hs
GPACalculator.hs — haskell source code from the haskell learning materials (haskell/GPACalculator.hs).
Read article →