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.
|
|---|
| 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 |