public EventCoinAnimation(Point startLocation, int lowestThresehold, EventOnCoin coinEvent, FormConnectFourGameBoard.GameState gState) { r_StartLoaction = startLocation; r_LowestThresehold = lowestThresehold; r_CoinEvent = coinEvent; r_State = gState; }
private void GameOver(GameState GameState, EventOnCoin Coin) { if (GameState == GameState.Victory) { string playerName; m_GameState = GameState.Victory; if (currentPlayerCoin == Board.eBoardSquare.Player1) { playerName = m_Player1Name; m_Player1Score++; toolStripStatusLabelPlayer1Score.Text = m_Player1Score.ToString(); } else { playerName = m_Player2Name; m_Player2Score++; toolStripStatusLabelPlayer2Score.Text = m_Player2Score.ToString(); } DialogResult dialogResult = MessageBox.Show( string.Format( @"{0} Won!! Another round?", playerName), k_WinString, MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { matchOver = false; RestartGame(); } else if (dialogResult == DialogResult.No) { Close(); } } else { DialogResult dialogResult = MessageBox.Show( string.Format(@"Tie!! Another round?"), k_TieString, MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { matchOver = false; RestartGame(); } else if (dialogResult == DialogResult.No) { Close(); } } }
private void ChangeCellToFullCell(EventOnCoin coinPos) { if (currentPlayerCoin == Board.eBoardSquare.Player1) { r_CoinImageBoard[coinPos.Col][coinPos.Row].BackgroundImage = Properties.Resources.FullCellRed; } else { r_CoinImageBoard[coinPos.Col][coinPos.Row].BackgroundImage = Properties.Resources.FullCellYellow; } }