Controller UpcomingBlock Property Delta Engine Documentation

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

public Block UpcomingBlock { get; }

Property Value

Type: Block
Remarks

Tests: Blocks.Tests.ControllerTests
Examples

2 unit tests call Blocks.Controller.UpcomingBlock
[Test, CloseAfterFirstFrame]
public void RunCreatesFallingAndUpcomingBlocks()
{
    AdvanceTimeAndUpdateEntities(0.1f);
    Assert.IsNotNull(controller.FallingBlock);
    Assert.IsNotNull(controller.UpcomingBlock);
}
[Test, CloseAfterFirstFrame]
public void WhenABlockAffixesTheUpcomingBlockBecomesTheFallingBlock()
{
    AdvanceTimeAndUpdateEntities(1.0f);
    var upcomingBlock = controller.UpcomingBlock;
    AdvanceTimeAndUpdateEntities(10.0f);
    Assert.AreEqual(upcomingBlock, controller.FallingBlock);
}
See Also