Skip to content

Instantly share code, notes, and snippets.

@ysnrkdm ysnrkdm/Main.hs
Created Dec 1, 2014

What would you like to do?
Test for move generation (very simple)
module Main where
-- friends
import qualified Usi
import qualified Board
import qualified Move
import qualified MoveGenerator
-- GHC
-- libraries
import Text.Printf (printf)
-- std
import Test.HUnit
import Test.Framework
import Test.Framework.Providers.HUnit
import Data.List
main :: IO ()
main = do
defaultMain $ hUnitTestToTests $ TestLabel "newMoveValidation" $ TestCase moveComp
moveComp = do
let board = Usi.bdFromSfen [
"GR5pnsg" ]
printf "board is now\n"
print board
printf "\n"
let moves = sort $ MoveGenerator.mvGenFull board
let movess = sort $ MoveGenerator.mvGenFullN board
print moves
printf "...\n"
print movess
printf "...\n"
moves @=? movess
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.