public void GetUniqueIdentifier_should_returnDifferentValuesForDifferentInTurnPlayer() { var b = "OOKOO" + "....." + "....." + "....." + "ookoo"; MiniMax.GetUniqueIdentifier(GameUtil.ParseGameState(b, inTurnPlayerIndex: 0)).Should().NotBe(MiniMax.GetUniqueIdentifier(GameUtil.ParseGameState(b, inTurnPlayerIndex: 1))); }
public void GetUniqueIdentifier_should_returnSameValuesForFlippedBoard_1() { var b = "OOKOO" + "....." + "....." + "....." + "ookoo"; var cardNumbers1 = new[] { 0, 1, 2, 3, 4 }; var cardNumbers2 = new[] { 2, 3, 0, 1, 4 }; MiniMax.GetUniqueIdentifier(GameUtil.ParseGameState(b, inTurnPlayerIndex: 0, cardNumbers: cardNumbers1)).Should().Be(MiniMax.GetUniqueIdentifier(GameUtil.ParseGameState(b, inTurnPlayerIndex: 1, cardNumbers: cardNumbers2))); }
public void GetUniqueIdentifier_should_returnDifferentValuesForDifferentCards() { var b = "OOKOO" + "....." + "....." + "....." + "ookoo"; var cards = new[] { Card.Boar, Card.Cobra, Card.Dragon, Card.Eel, Card.Frog }; var cardNumbers1 = new[] { 0, 1, 2, 3, 4 }; var cardNumbers2 = new[] { 0, 1, 2, 4, 3 }; MiniMax.GetUniqueIdentifier(GameUtil.ParseGameState(b, cards, 0, cardNumbers1)).Should().NotBe(MiniMax.GetUniqueIdentifier(GameUtil.ParseGameState(b, cards, 0, cardNumbers2))); }
public void GetUniqueIdentifier_should_returnDifferentValueForBoardsWithPawnRemoved() { var b1 = "OOKOO" + "....." + "....." + "....." + "ookoo"; var b2 = "OOKOO" + "....." + "....." + "....." + "ook.o"; MiniMax.GetUniqueIdentifier(GameUtil.ParseGameState(b1)).Should().NotBe(MiniMax.GetUniqueIdentifier(GameUtil.ParseGameState(b2))); }
public void GetUniqueIdentifier_should_returnDifferentValueForBoardsWithPawnsInDIfferentPositions2() { var b1 = "OO..." + "..K.." + "...o." + ".o..." + "..k.o"; var b2 = "OO..." + "..K.." + "...o." + "..o.." + "..k.o"; MiniMax.GetUniqueIdentifier(GameUtil.ParseGameState(b1)).Should().NotBe(MiniMax.GetUniqueIdentifier(GameUtil.ParseGameState(b2))); }
public void GetUniqueIdentifier_should_returnSameValueForMirroredBoards_3() { var b1 = "....K" + "O...O" + "....." + "....." + "oo..k"; var b2 = "K...." + "O...O" + "....." + "....." + "k..oo"; MiniMax.GetUniqueIdentifier(GameUtil.ParseGameState(b1)).Should().Be(MiniMax.GetUniqueIdentifier(GameUtil.ParseGameState(b2))); }
public void GetUniqueIdentifier_should_returnSameValuesForSameCardsInDifferentOrder() { var b = "O.KOO" + "....." + ".O..." + "..oo." + "..koo"; var cards = new[] { Card.Boar, Card.Cobra, Card.Dragon, Card.Eel, Card.Frog }; var cardNumbers1 = new[] { 0, 1, 2, 3, 4 }; var cardNumbers2 = new[] { 1, 0, 2, 3, 4 }; var cardNumbers3 = new[] { 0, 1, 3, 2, 4 }; var cardNumbers4 = new[] { 1, 0, 3, 2, 4 }; MiniMax.GetUniqueIdentifier(GameUtil.ParseGameState(b, cards, 0, cardNumbers1)).Should().Be(MiniMax.GetUniqueIdentifier(GameUtil.ParseGameState(b, cards, 0, cardNumbers2))); MiniMax.GetUniqueIdentifier(GameUtil.ParseGameState(b, cards, 0, cardNumbers1)).Should().Be(MiniMax.GetUniqueIdentifier(GameUtil.ParseGameState(b, cards, 0, cardNumbers3))); MiniMax.GetUniqueIdentifier(GameUtil.ParseGameState(b, cards, 0, cardNumbers1)).Should().Be(MiniMax.GetUniqueIdentifier(GameUtil.ParseGameState(b, cards, 0, cardNumbers4))); }