Game ClassDelta Engine Documentation
Knits the main control classes together by feeding events raised by one to another View code on GitHub
Inheritance Hierarchy

System Object
  Blocks Game

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

public class Game

The Game type exposes the following members.

Constructors

  NameDescription
Public methodGame
Initializes a new instance of the Game class
Top
Methods

  NameDescription
Public methodStartGame
Top
Properties

  NameDescription
Public propertyController
Protected propertyDisplayMode
Public propertyIsInGame
Public propertyUserInterface
Top
Remarks

Tests: Blocks.Tests.GameTests
Examples

16 unit tests call Blocks.Game
[Test, CloseAfterFirstFrame]
public void CreateGameInPortrait()
{
    var window = Resolve<Window>();
    window.ViewportPixelSize = new Size(600, 800);
    AdvanceTimeAndUpdateEntities();
}
[Test, CloseAfterFirstFrame]
public void CreateGameInLandscape()
{
    var window = Resolve<Window>();
    window.ViewportPixelSize = new Size(800, 600);
    AdvanceTimeAndUpdateEntities();
}
[Test, CloseAfterFirstFrame]
public void AffixingBlockAddsToScore()
{
    game.StartGame();
    Assert.AreEqual(0, game.UserInterface.Score);
    AdvanceTimeAndUpdateEntities(10.0f);
    Assert.AreEqual(1, game.UserInterface.Score);
}
See Also