Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created October 22, 2019 03:42
Embed
What would you like to do?
[<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