public void ThenItRendersThePlayer() { var map = new Stage1().LoadMap(); var renderer = new RendererDouble(map); var engine = new GameEngineBuilder() .WithRenderer(renderer) .WithPlayer(new Player(map.SpawnLocation())) .Build(); engine.Draw(); int zeroBasedRow = map.SpawnLocation().Row - 1; int zeroBasedColumn = map.SpawnLocation().Column - 1; char cellForSpawnLocation = renderer.Output[zeroBasedRow][zeroBasedColumn]; cellForSpawnLocation.Should().Be(RenderableFactory.PLAYER_REPRESENTATION); }
public void ThenItRendersThePlayer() { var map = new Stage1().LoadMap(); var input = new InputDouble(); var renderer = new RendererDouble(map); var engine = new GameEngineBuilder() .WithInput(input) .WithRenderer(renderer) .WithPlayer(new Player(5, 5)) .Build(); input.SendInput(InputResult.East); renderer .Output[4] .Should() .Contain(RenderableFactory.PLAYER_REPRESENTATION.ToString()); }