Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Last active October 21, 2019 05:24
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/e3155a63596cfd18bbf1cb619f4202db to your computer and use it in GitHub Desktop.
Save IntegerMan/e3155a63596cfd18bbf1cb619f4202db to your computer and use it in GitHub Desktop.
[<Fact>]
let ``Simulating actors should decrease the turns left counter`` () =
// Arrange
let initialState = buildTestState
// Act
let newState = simulateActors initialState getRandomNumber
// Assert
newState.TurnsLeft |> should equal (initialState.TurnsLeft - 1)
[<Fact>]
let ``Running out of turns should lose the simulation`` () =
// Arrange
let state: GameState = {buildTestState with TurnsLeft = 0}
// Act
let newState = simulateActors state getRandomNumber
// Assert
newState.SimState |> should equal Lost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment