public void CreateASingleGame() { Random random = new Random(); int[] randomPositions = Enumerable.Range(1, 8).OrderBy(x => random.Next()).ToArray(); CodePositions = new CodeMakerPositions(GameId, randomPositions); }
public void CreateMultiplayer(int PositionOfPeg1, int PositionOfPeg2, int PositionOfPeg3, int PositionOfPeg4, int PositionOfPeg5, int PositionOfPeg6, int PositionOfPeg7, int PositionOfPeg8) { int[] positions = new int[8]; positions[0] = PositionOfPeg1; positions[1] = PositionOfPeg2; positions[2] = PositionOfPeg3; positions[3] = PositionOfPeg4; positions[4] = PositionOfPeg5; positions[5] = PositionOfPeg6; positions[6] = PositionOfPeg7; positions[7] = PositionOfPeg8; CodePositions = new CodeMakerPositions(GameId, positions); }