Score ClassDelta Engine Documentation
Each brick can either be dead or alive, has a color and the bounding rectangle for rendering and collision detection. View code on GitHub
Inheritance Hierarchy

System Object
  Breakout Score

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

public class Score

The Score type exposes the following members.

Constructors

  NameDescription
Public methodScore
Initializes a new instance of the Score class
Top
Methods

  NameDescription
Public methodIncreasePoints
Public methodLifeLost
Public methodNextLevel
Public methodToString (Overrides Object ToString .)
Top
Properties

  NameDescription
Public propertyLevel
Top
Events

  NameDescription
Public eventGameOver
Top
Remarks

Tests: Breakout.Tests.ScoreTests
Examples

4 unit tests call Breakout.Score
[Test]
public void IncreasePoints()
{
    Assert.IsTrue(score.ToString().Contains("Score: 0"), score.ToString());
    score.IncreasePoints();
}
[Test]
public void NextLevelWithoutInitialization()
{
    bool isGameOver = false;
    score.GameOver += () => isGameOver = true;
    Assert.AreEqual(1, score.Level);
    score.NextLevel();
    Assert.AreEqual(2, score.Level);
    Assert.IsFalse(isGameOver);
}
[Test]
public void NextLevelWithLevelInitialization()
{
    Resolve<Level>();
    bool isGameOver = false;
    score.GameOver += () => isGameOver = true;
    Assert.AreEqual(1, score.Level);
    score.NextLevel();
    Assert.AreEqual(2, score.Level);
    Assert.IsFalse(isGameOver);
}
See Also