Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created October 22, 2019 03:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IntegerMan/15b6874c8dd2fe0e66e7c44f8d85a134 to your computer and use it in GitHub Desktop.
Save IntegerMan/15b6874c8dd2fe0e66e7c44f8d85a134 to your computer and use it in GitHub Desktop.
[<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