ControllerTests LoseIfIsBrickOnTopRow Method Delta Engine Documentation

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

public void LoseIfIsBrickOnTopRow()
Examples

[Test, CloseAfterFirstFrame]
public void LoseIfIsBrickOnTopRow()
{
    Assert.IsFalse(sounds.GameLost.IsAnyInstancePlaying);
    grid.AffixBlock(new Block(displayMode, content, new Vector2D(1, 0)));
    bool lost = false;
    controller.Lose += () => lost = true;
    AdvanceTimeAndUpdateEntities(0.1f);
    Assert.IsTrue(lost);
    Assert.IsTrue(sounds.GameLost.IsAnyInstancePlaying);
}
See Also