Controller RotateBlockAntiClockwiseIfPossible Method Delta Engine Documentation

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

public void RotateBlockAntiClockwiseIfPossible()
Remarks

Tests: Blocks.Tests.ControllerTests
Examples

2 unit tests call Blocks.Controller.RotateBlockAntiClockwiseIfPossible
[Test, CloseAfterFirstFrame]
public void RotateClockwise()
{
    Assert.IsFalse(sounds.BlockMoved.IsAnyInstancePlaying);
    controller.FallingBlock = new Block(displayMode, content, new Vector2D(8, 1));
    controller.RotateBlockAntiClockwiseIfPossible();
    Assert.IsTrue(sounds.BlockMoved.IsAnyInstancePlaying);
    controller.FallingBlock.Left = 11;
    controller.RotateBlockAntiClockwiseIfPossible();
}
[Test, CloseAfterFirstFrame]
public void CurrentBlockBeingNullWillNotCrashMovement()
{
    controller.FallingBlock = null;
    Assert.DoesNotThrow(controller.MoveBlockLeftIfPossible);
    Assert.DoesNotThrow(controller.MoveBlockRightIfPossible);
    Assert.DoesNotThrow(controller.RotateBlockAntiClockwiseIfPossible);
}
See Also