Namespace: Drench.Logics
Assembly: Drench (in Drench.exe) Version: 1.1.1.0 (1.1.1)
Tests: Drench.Tests.Logics.SinglePlayerLogicTests
2 unit tests call Drench.Logics.Logic.IsGameOver
Assembly: Drench (in Drench.exe) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: BooleanRemarks
Examples
[Test] public void GameIsNotFinishedAfterFirstMove() { bool isGameFinished = false; logic.GameFinished += () => isGameFinished = true; logic.MakeMove(Color.Red); Assert.IsFalse(logic.IsGameOver); Assert.IsFalse(isGameFinished); Assert.AreEqual(1, logic.GetPlayerScore(0)); }
[Test] public void WhenBoardIsAllTheSameColorGameIsFinished() { bool isGameFinished = false; logic.GameFinished += () => isGameFinished = true; MakeWinningMove(); Assert.IsTrue(logic.IsGameOver); Assert.IsTrue(isGameFinished); Assert.AreEqual(BoardTests.Width * BoardTests.Height, logic.GetPlayerScore(0)); }
See Also