SinglePlayerLogic ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  Drench.Logics Logic
    Drench.Logics SinglePlayerLogic

Namespace: Drench.Logics
Assembly: Drench (in Drench.exe) Version: 1.1.1.0 (1.1.1)
Syntax

public class SinglePlayerLogic : Logic

The SinglePlayerLogic type exposes the following members.

Constructors

  NameDescription
Public methodSinglePlayerLogic
Initializes a new instance of the SinglePlayerLogic class
Top
Methods

  NameDescription
Protected methodCheckForGameOver (Inherited from Logic.)
Protected methodGameOver (Inherited from Logic.)
Public methodGetPlayerScore (Inherited from Logic.)
Public methodGetPlayerTurnsTaken (Inherited from Logic.)
Public methodMakeMove (Overrides Logic MakeMove(Color).)
Public methodPass (Overrides Logic Pass .)
Public methodReset (Inherited from Logic.)
Top
Fields

  NameDescription
Protected fieldhomeSquares (Inherited from Logic.)
Protected fieldturns (Inherited from Logic.)
Top
Properties

  NameDescription
Public propertyActivePlayer (Inherited from Logic.)
Public propertyIsGameOver (Inherited from Logic.)
Public propertyLastPlayerPassed (Inherited from Logic.)
Top
Events

  NameDescription
Public eventGameFinished (Inherited from Logic.)
Top
Remarks

Tests: Drench.Tests.Logics.SinglePlayerLogicTests
Examples

8 unit tests call Drench.Logics.SinglePlayerLogic
[Test]
public void ActivePlayerIsZero()
{
    Assert.AreEqual(0, logic.ActivePlayer);
}
[Test]
public void GetColor()
{
    Assert.AreEqual(new Color(0.5f, 1.0f, 1.0f), logic.Board.GetColor(0, 0));
}
[Test]
public void ResetGame()
{
    logic.Reset();
    Assert.AreEqual(new Color(1.0f, 1.0f, 0.5f), logic.Board.GetColor(0, 0));
}
See Also