static void Main(string[] args) { const int n = 4; // number of images on a card const int rep = 4; // number of repeters of an image var cards = new CardsGenerator().Generate(n, rep); }
public void AllCardsConnectWithEachOver() { const int width = 1 + (rep - 1)*n; var cards = new CardsGenerator().Generate(n, rep); ShowCards(cards); for (int i = 0; i < width; i++) { for (int j = 0; j < n; j++) { for (int i1 = 0; i1 < width; i1++) { bool isConnect = false; for (int j1 = 0; j1 < n; j1++) { if (cards[j, i] == cards[j1, i1]) { isConnect = true; break; } } Assert.IsTrue(isConnect); } } } }