//Method that will calculate which player has a higher score at the end of the game and print that message to the user. public bool printWinner() { if (currentBoard.getvalue(6) + currentBoard.getvalue(13) == 48) { if (currentBoard.getvalue(6) > currentBoard.getvalue(13)) { MessageBox.Show(player.getName() + " Wins!"); return(true); } else { MessageBox.Show(player.getName() + " Wins!"); return(true); } } return(false); }
//checks to see if the sum of the two store pockets on the sides adds up to 48 public bool checkWin() { if (currentBoard.getvalue(6) + currentBoard.getvalue(13) == 48) { if (currentBoard.getvalue(6) > currentBoard.getvalue(13)) { MessageBox.Show(Player1.getName() + " Wins!"); return(true); } else { MessageBox.Show(Player2.getName() + " Wins!"); return(true); } } return(false); }