public void Test01() { GameState gameState = TestCases.Test01(); var move = this.brain.Move(gameState); Assert.That(move, Is.EqualTo(LegalMove.Right)); }
public void Test01() { var gameState = TestCases.Test01(); var stopwatch = Stopwatch.StartNew(); var move = this.brain.Move(gameState); Console.WriteLine(stopwatch.Elapsed); Assert.That(move, Is.EqualTo(LegalMove.Right).Or.EqualTo(LegalMove.Left)); }
public void ProcessMoves_MoveIntoUpperWallWithFullHealth_SnakeGetsZeroHealth() { var board = TestCases.Test01().Board; int[,] boardArray = GetBoardArray(board); var snakeBodies = GetSnakeBodies(board); var healths = GetHealths(board); var moves = new LegalMove[] { LegalMove.Up }; (var futureSnakes, var futureHealths) = this.gameEngine.ProcessMoves(snakeBodies, healths, boardArray, moves); Assert.That(futureHealths[0], Is.EqualTo(0)); }