Skip to content

Instantly share code, notes, and snippets.

@IntegerMan

IntegerMan/HungerGames.fs

Last active Oct 21, 2019
Embed
What would you like to do?
[<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
You can’t perform that action at this time.