Skip to content

Instantly share code, notes, and snippets.

@amw-zero
Created April 7, 2020 18:27
Show Gist options
  • Save amw-zero/6ef9edab1b618f0b1745783aba40d90d to your computer and use it in GitHub Desktop.
Save amw-zero/6ef9edab1b618f0b1745783aba40d90d to your computer and use it in GitHub Desktop.
let testLegalityOfFiveOfSpadesAndSixOfClubs = () => {
let fiveOfSpades = {suit: Spades, rank: 5};
let sixOfClubs = {suit: Clubs, rank: 6};
let isFiveToSixLegal =
isLegalMove(~source=fiveOfSpades, ~dest=sixOfClubs);
[
Bool.assertEqual(
~expected=false,
~actual=isFiveToSixLegal,
"Moving the five of spades onto the six of clubs is not a legal move",
),
];
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment