Skip to content

Instantly share code, notes, and snippets.

@alexson
Created January 13, 2022 09:18
Show Gist options
  • Save alexson/50d1ab71b078c59d84086656e87fff48 to your computer and use it in GitHub Desktop.
Save alexson/50d1ab71b078c59d84086656e87fff48 to your computer and use it in GitHub Desktop.
public bool CheckIsWinner()
{
bool isWinner = false;
//Populate _peerScoreList if the _scoreList if not match with peer list
foreach (IPeer peer in _SyncStateTrackingList._peerTrackerDict.Keys)
if (!_peerScoreList.ContainsKey(peer))
_peerScoreList.Add(peer, 0);
foreach (int _score in _peerScoreList.Values)
{
if (score > _score)
{
isWinner = true;
return isWinner;
}
}
return isWinner;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment