Game ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  TinyPlatformer Game

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

public class Game

The Game type exposes the following members.

Constructors

  NameDescription
Public methodGame
Load a map and bind keyboard controls to player actions View code on GitHub
Top
Remarks

Tests: TinyPlatformer.Tests.GameTests
Examples

9 unit tests call TinyPlatformer.Game
[Test, CloseAfterFirstFrame]
public void PlayerDoesNotWantToMoveLeftOrRight()
{
    Assert.IsFalse(player.WantsToGoLeft);
    Assert.IsFalse(player.WantsToGoRight);
    Assert.IsFalse(player.WantsToJump);
}
[Test, CloseAfterFirstFrame]
public void CursorLeftMakesPlayerWantToMoveLeft()
{
    PressKey(Key.CursorLeft);
    Assert.IsTrue(player.WantsToGoLeft);
    Assert.IsFalse(player.WantsToGoRight);
    Assert.IsFalse(player.WantsToJump);
}
[Test, CloseAfterFirstFrame]
public void CursorRightMakesPlayerWantToMoveRight()
{
    PressKey(Key.CursorRight);
    Assert.IsFalse(player.WantsToGoLeft);
    Assert.IsTrue(player.WantsToGoRight);
    Assert.IsFalse(player.WantsToJump);
}
See Also