public void Example_3() { var cc = new CrabCombat { P1 = new Queue <int>(new [] { 43, 19 }), P2 = new Queue <int>(new [] { 2, 29, 14 }) }; cc.BattleRecursive(cc.P1, cc.P2); Assert.Equal(105, cc.P1Score); Assert.Equal(0, cc.P2Score); }
public void Example_2() { var cc = new CrabCombat { P1 = new Queue <int>(new [] { 9, 2, 6, 3, 1 }), P2 = new Queue <int>(new [] { 5, 8, 4, 7, 10 }) }; cc.BattleRecursive(cc.P1, cc.P2); Assert.Equal(0, cc.P1Score); Assert.Equal(291, cc.P2Score); }
public void Puzzle_22B() { var cc = new CrabCombat { P1 = new Queue <int>(PuzzleP1), P2 = new Queue <int>(PuzzleP2) }; cc.BattleRecursive(cc.P1, cc.P2); Assert.True(cc.P1Score > 11908, "too low"); Assert.True(cc.P1Score > 15110, "too low"); Assert.Equal(35055, cc.P1Score); Assert.Equal(0, cc.P2Score); }