Namespace: Blocks
Assembly: Blocks (in Blocks.exe) Version: 1.1.1.0 (1.1.1)
Tests: Blocks.Tests.ControllerTests
8 unit tests call Blocks.Controller.FallingBlock
Assembly: Blocks (in Blocks.exe) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: BlockRemarks
Examples
[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); }
[Test, CloseAfterFirstFrame] public void CantMoveLeftAtLeftWall() { Assert.IsFalse(sounds.BlockCouldNotMove.IsAnyInstancePlaying); controller.FallingBlock = new Block(displayMode, content, new Vector2D(0, 1)); controller.MoveBlockLeftIfPossible(); Assert.IsTrue(sounds.BlockCouldNotMove.IsAnyInstancePlaying); Assert.AreEqual(0, controller.FallingBlock.Left); }
See Also