SnakeTests CreateSnakeAtOrigin 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 CreateSnakeAtOrigin()
Examples

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