ChunkTests CreateFirstChunk 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 CreateFirstChunk()
Examples

[Test]
public void CreateFirstChunk()
{
    var chunk = new Chunk(gridSize, blockSize, Color.Purple);
    Assert.IsTrue(chunk.IsActive);
    Assert.AreEqual(blockSize, chunk.Size.Width);
    Assert.AreEqual(blockSize, chunk.Size.Height);
    Assert.AreEqual(Color.Purple, chunk.Color);
    Assert.LessOrEqual(0.0f, chunk.DrawArea.Left);
    Assert.LessOrEqual(0.0f, chunk.DrawArea.Top);
    Assert.GreaterOrEqual(1.0f, chunk.DrawArea.Left);
    Assert.GreaterOrEqual(1.0f, chunk.DrawArea.Top);
}
See Also