This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[<Fact>] | |
let ``Squirrel Getting Acorn to Tree Should Win Game`` () = | |
// Arrange | |
let customSquirrel = {Pos=newPos 9 10; ActorKind = Squirrel true; IsActive = true} | |
let testState = buildTestState | |
let state: GameState = {testState with World = {testState.World with Squirrel = customSquirrel}} | |
// Act | |
let newState = handlePlayerCommand state MoveLeft | |
// Assert | |
newState.World.Squirrel.Pos |> should equal state.World.Tree.Pos | |
newState.SimState |> should equal Won |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment