/// <summary> /// End of Round 5 /// compares score and shows respective dialog /// /// </summary> private void GameFinished() { gameData.GameState = GameState.END; bool isWinner = true; float playerOneScore = gameData.CurrentPlayerList[0].TotalScore; // SpadesPlayer[0].TotalScore; foreach (player p in gameData.CurrentPlayerList) //SpadesPlayer) { if (p.ID != 0 && p.TotalScore > playerOneScore) { isWinner = false; } } if (isWinner == false) { LooserForm LF = new LooserForm(); //LF.MdiParent = this; LF.StartPosition = FormStartPosition.CenterParent; LF.ShowDialog(); } else { WinnerForm WF = new WinnerForm(); WF.StartPosition = FormStartPosition.CenterParent; WF.ShowDialog(); } ResetGame(); startGame(); // throw new NotImplementedException(); }
/// <summary> /// End of Round 5 /// compares score and shows respective dialog /// /// </summary> private void GameFinished() { gameData.GameState = GameState.END; bool isWinner = true; float playerOneScore = gameData.CurrentPlayerList[0].TotalScore; // SpadesPlayer[0].TotalScore; foreach (player p in gameData.CurrentPlayerList) //SpadesPlayer) { if (p.ID != 0 && p.TotalScore > playerOneScore) isWinner = false; } if (isWinner == false) { LooserForm LF = new LooserForm(); //LF.MdiParent = this; LF.StartPosition = FormStartPosition.CenterParent; LF.ShowDialog(); } else { WinnerForm WF = new WinnerForm(); WF.StartPosition = FormStartPosition.CenterParent; WF.ShowDialog(); } ResetGame(); startGame(); // throw new NotImplementedException(); }