SnakeTests RemovingAllBodyPartsStillGivesAPosition Method Delta Engine Documentation

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

public void RemovingAllBodyPartsStillGivesAPosition()
Examples

[Test, CloseAfterFirstFrame]
public void RemovingAllBodyPartsStillGivesAPosition()
{
    var snake = new Snake(gridSize, Color.Green);
    snake.Get<Body>().BodyParts.Clear();
    AdvanceTimeAndUpdateEntities();
    Assert.AreEqual(Vector2D.Half, snake.Get<Body>().HeadPosition);
}
See Also