private void initGame(int i_SizeOfBoard) { //construct a new checkers game with compatible name of two players or player and computer int numberOfPlayers = m_FormSettings.NumberOfPlayers; m_Checkers = new Game(m_Player1Name, m_Player2Name, i_SizeOfBoard, numberOfPlayers); m_BoardInterface = new BoardUI(i_SizeOfBoard); Controls.Add(m_BoardInterface); player1Label.Text = string.Format(@"{0}{1}Game score: {2}{3}Tournament score: {4}", m_Player1Name, "\n", Game.FirstPlayer.Score, "\n", Game.FirstPlayer.TournamentScore); player2Label.Text = string.Format(@"{0}{1}Game score: {2}{3}Tournament score: {4}", m_Player2Name, "\n", Game.SecondPlayer.Score, "\n", Game.SecondPlayer.TournamentScore); player1Label.Left = m_BoardInterface.Left; player2Label.Left = m_BoardInterface.Right - player2Label.Width + 15; turnLabel.Text = m_Player1Name + "'s turn"; Padding = new Padding(50, 30, 50, 50); turnLabel.Location = new Point((ClientSize.Width / 2 - turnLabel.Width / 2), 20); AutoSize = true; Top = 50; }
public ConsoleUI() { initMenuScreenMassages(out r_ScreenMenuMassages); m_Board = null; }
public void CreateBoardUI(int i_BoardSize) { m_Board = new BoardUI(i_BoardSize, 'A'); }