コード例 #1
0
 /// <summary>
 /// Batch a set of plays
 /// </summary>
 private static void CommitPlays(SixNimmtGameState gameState, int[] plays)
 {
     foreach (int play in plays)
     {
         gameState.CommitPlay(play);
     }
 }
コード例 #2
0
        // [TestInitialize]
        public SixNimmtTests()
        {
            this.random = new Random(0xbeef);
            SixNimmtDeck deck = SixNimmtDeck.Create(random);

            this.gameState = SixNimmtGameState.Create(random, deck, playerCount: 5, proMode: false);
        }
コード例 #3
0
 /// <summary>
 /// Tests the scores in "gameState" against expectedScores
 /// </summary>
 private static void ValidateScores(SixNimmtGameState gameState, int[] expectedScores)
 {
     int[] scores = gameState.Evaluate().Select(x => (int)x).ToArray();
     CollectionAssert.AreEqual(expectedScores, scores);
 }