Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created October 21, 2019 04:52
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/d0b997eb50d622277177622fed282926 to your computer and use it in GitHub Desktop.
Save IntegerMan/d0b997eb50d622277177622fed282926 to your computer and use it in GitHub Desktop.
[<Fact>]
let ``Dog Should Eat Squirrel If Adjacent`` () =
// Arrange
let customSquirrel = {Pos=newPos 3 6; ActorKind = Squirrel false; IsActive = true}
let testState = buildTestState
let state: GameState = {testState with World = {testState.World with Squirrel = customSquirrel}}
// Act
let newState = simulateActors state getRandomNumber
// Assert
newState.World.Doggo.Pos |> should equal testState.World.Squirrel.Pos
newState.World.Squirrel.IsActive |> should equal false
newState.SimState |> should equal Lost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment