in reply to How tell if you can play a card with multi type 'Mana'

I would understand more if you described this situation in more general terms. From what you described, a Tree with many branches at any node (n-ary tree) may be a suitable data structure to evaluate all scenaria at any depth you wish, given available resources. There are algorithms to find the route with the least cost. A hash (of hashes) can also be used but you will have to implement the search algorithms yourself. In a multi-player game such trees are used to enumerate all available moves/choices/scenaria by all the players at any depth (given resources!ouch!) Then winning the game is a matter of following the branches which minimise your costs (and maximise your opponents'), re: the minmax algorithm, assuming your opponents also make reasonable moves.

  • Comment on Re: How tell if you can play a card with multi type 'Mana'

Replies are listed 'Best First'.
Re^2: How tell if you can play a card with multi type 'Mana'
by Dr.Altaica (Scribe) on Dec 30, 2019 at 01:45 UTC
    after 3 days of struggling to write it manually I finally decided to write a script to write my program for me. I'm trying to learn Python so I can use PsychSim The more of python I learn the more I miss Perl. If there ware warnings my life would be so much easer. What I miss most is there's no 'PythonMonks'. If you want to look at my code it's on github