private Player AddPlayer() { MapPosition playerLocation = new MapPosition(0, 0); Player myPlayer = new Player( "Bonzo", Player.GenderNames.Male, Player.RaceNames.Human, playerLocation ); return myPlayer; }
public GameController() { _myPlayer = AddPlayer(); ConsoleView userConsoleView = new ConsoleView(_gameMap); userConsoleView.InitializeConsoleWindow(); userConsoleView.DisplayMap(); userConsoleView.DisplayPlayer(_myPlayer); userConsoleView.DisplayCellInfo(_myPlayer.Location); Console.ReadLine(); }
public void DisplayPlayer(Player myPlayer) { int cursorRow = (myPlayer.Location.Row * NUMBER_OF_CELL_ROWS) + 2 + DISPALY_VERITCAL_MARGIN; int cursorColumn = (myPlayer.Location.Column * NUMBER_OF_CELL_COLOMNS) + 2 + DISPLAY_HORIZONTAL_MARGIN; Console.ForegroundColor = ConsoleColor.Red; Console.SetCursorPosition(cursorColumn, cursorRow); Console.Write("@"); Console.ForegroundColor = ConsoleColor.White; Console.CursorVisible = false; }