public void Round(GameForm i_GameForm) { m_Game.StartTurns(i_GameForm.ColumnClicked, i_GameForm.RowClicked, m_GameUI.QuittingTheGame, true); i_GameForm.Board = m_Game.Board; i_GameForm.SetGameFrom(); i_GameForm.Refresh(); bool haveMoves = m_Game.HaveMoves(); while ((!haveMoves) && (m_Game.FirstPlayer.HaveMoves == true || m_Game.SecondPlayer.HaveMoves == true)) { switchPlayersTurn(); haveMoves = m_Game.HaveMoves(); } if (!(m_Game.FirstPlayer.HaveMoves == true || m_Game.SecondPlayer.HaveMoves == true)) { m_GameControl.StartGame.UpdateGameStatus(); m_GameControl.ShowStatusAfterRunning(); i_GameForm.Close(); } playerColor playerColorTurn = m_Game.GetPlayerTurn(); i_GameForm.ChangeTitle(playerColorTurn); i_GameForm.SetGameFrom(); i_GameForm.Refresh(); if (m_Game.SecondPlayer.Turn && m_Game.SecondPlayer.Type == playerType.Computer) { Round(i_GameForm); } }
public void Round(GameForm i_GameForm) { i_GameForm.SizeBoard = m_StartGame.BoardSize; i_GameForm.StartGameFrom(); bool haveMoves = m_StartGame.HaveMoves(); while ((!haveMoves) && (m_StartGame.FirstPlayer.HaveMoves == true || m_StartGame.SecondPlayer.HaveMoves == true)) { switchPlayersTurn(); haveMoves = m_StartGame.HaveMoves(); } if (!(m_StartGame.FirstPlayer.HaveMoves == true || m_StartGame.SecondPlayer.HaveMoves == true)) { m_StartGame.UpdateGameStatus(); } playerColor playerColorTurn = m_StartGame.GetPlayerTurn(); i_GameForm.ChangeTitle(playerColorTurn); i_GameForm.SetGameFrom(); i_GameForm.Refresh(); }