public static void CheckBoardAfterMove(int startval, int endval) //tests thoroughly that the move happens as it should AND that the number of cows stays the same after a shift { Morabaraba morabaraba = new Morabaraba(); morabaraba.Move(startval); morabaraba.NextTurn(); var cowcount = morabaraba.CurrentBoard.CowsOnBoard(); morabaraba.SetTurnPhase(Models.Phases.Phase.Moving); var temp = morabaraba.GetBoard()[startval].Get(); morabaraba.Move(startval); morabaraba.Move(endval); Assert.That(morabaraba.GetBoard()[endval].Get() == temp && morabaraba.GetBoard()[startval].Get() == Models.ColorType.Colour.Empty && morabaraba.CurrentBoard.CowsOnBoard() == cowcount); }
public static void BoardEmpty() { Morabaraba currentGameSession = new Morabaraba(); bool check = currentGameSession.GetBoard().Contains(new Cow(MorabarabaNS.Models.ColorType.Colour.Dark)) || currentGameSession.GetBoard().Contains(new Cow(MorabarabaNS.Models.ColorType.Colour.Light)); Assert.That(!check); }
public static void ShotCowRemoved() { Morabaraba morabaraba = new Morabaraba(); morabaraba.Move(23); morabaraba.Move(0); morabaraba.NextTurn(); morabaraba.Move(1); morabaraba.NextTurn(); morabaraba.Move(2); morabaraba.Move(23); Assert.That(morabaraba.GetBoard()[23].Get() == MorabarabaNS.Models.ColorType.Colour.Empty); }