public void TestCheckIfPoppableBallonsNotPoppable() { PlayField field = new PlayField(3, 3, 1); field.MakeChangesToField(1, 1); CommandParser parser = new CommandParser(); int countPopped=0; for (int i = 0; i < field.GetLength(0); i++) { for (int j = 0; j < field.GetLength(1); j++) { if (!parser.CheckPoppableBalloon( i.ToString()+" "+j.ToString(), field)) { countPopped++; } } } Assert.AreEqual(9, countPopped); }
public void TestCheckIfPoppableBallonsPoppable() { PlayField field = new PlayField(3, 3); CommandParser parser=new CommandParser(); bool isPoppable = parser.CheckPoppableBalloon("2 1", field); Assert.AreEqual(true, isPoppable); }