/* Generates new share for a player according to his/her old share (CurShare) and list of subshare (subshares) from other players */ private static Share GenerateNewShare(Share CurShare, Field[] subshares) { if (subshares.Length == 0) { throw new System.ArgumentException("Array subshares cannot be empty", "subshares"); } Field NewX = CurShare.GetX(); Field NewY = CurShare.GetY(); for (byte i = 0; i < subshares.Length; i++) { NewY += subshares[i]; } Share NewShare = new Share(NewX, NewY); return(NewShare); }
public Share(Share S) { t = new Tuple <Field, Field>(S.GetX(), S.GetY()); }