private void determiningTheWinner() { m_Winner = new Player(); if (m_GamePlayerVSPlayer == true) { if (m_PlayerNumber1.PlayerScore > m_PlayerNumber2.PlayerScore) { m_Winner.PlayerName = m_PlayerNumber1.PlayerName; m_Winner.PlayerScore = m_PlayerNumber1.PlayerScore; } else { m_Winner.PlayerName = m_PlayerNumber2.PlayerName; m_Winner.PlayerScore = m_PlayerNumber2.PlayerScore; } } else { if (m_PlayerNumber1.PlayerScore > m_ComputerPlay.ComputerScore) { m_Winner.PlayerName = m_PlayerNumber1.PlayerName; m_Winner.PlayerScore = m_PlayerNumber1.PlayerScore; } else { m_Winner.PlayerName = "The Computer"; m_Winner.PlayerScore = m_ComputerPlay.ComputerScore; } } }
public void LoadPlayer(PlayerSetup setup, int id) { Player player = new Player(setup); Data.PlayerDict.Add(id, player); }