1
Vote

Incorrect sanity check at SetupCardsAnImages

description

In Matchingo.Modules.CardGridModule.Views.CardGridView class in SetupCardsAndImages() method sanity are
        // sanity check
        if (ViewModel.CardImageUriList.Count < ViewModel.GameCardSet.Count)
            throw new Exception("CardGridView.SetupCardsToImagesMappings() - there are not enough card images to play with the requested number of cards");
 
I think that in if statement should be if ViewModel.CardImageUriList.Count * 2
(ViewModel.CardImageUriList.Count * 2< ViewModel.GameCardSet.Count)
Because all cards in game stay in pairs and e.g 10 images is enough to serve game for 20 cards

comments