private static void Main() { input = new StandardInput(); IKeyReader keyReader = new InputArrowKeyReader(input); output = new StandardOutput(); players = new Dictionary <char, IPlayer>(); string p1name = input.ReadLine(); players.Add(p1name[0], CreatePlayer(p1name)); string p2name = input.ReadLine(); players.Add(p2name[0], CreatePlayer(p2name)); int[] dimensions = input.ReadLine().Split().Select(int.Parse).ToArray(); int rows = dimensions[0]; int cols = dimensions[1]; IGrid <IInteractable, IPlayer> grid = new NinjaGrid <IInteractable, IPlayer>(rows, cols); PopulateGrid(rows, cols, grid); IGame game = new NinjaGame(players[p1name[0]], players[p2name[0]], grid, keyReader); game.Start(); PrintWinner(game.Winner); }
public void DebugDraw(SpriteBatch spriteBatch, NinjaGame game, Vector2 position) { for (int index = 0; index < VertexList.Count; index++) { spriteBatch.DrawString(game.DebugFont, VertexList[index].ToString(), position + 50 * index * Vector2.UnitY, Color.Orange); } }
public Terrain(NinjaGame game) : base(game) { }
public GameObject(NinjaGame game) { Game = game; }
public Player(NinjaGame game) : base(game) { }