Card Game Questions
#1
Posted 26 July 2006 - 09:54 PM
#2
Posted 26 July 2006 - 10:06 PM
If you want to talk theory, can you narrow it down to one particular concept you're having problems with?
If you're having a coding problem, can you show us the code you've got so far?
#3
Posted 26 July 2006 - 10:40 PM
#4
Posted 26 July 2006 - 10:54 PM
in the first way you make a different list for every type of card (common uncommon and rare). then you'll just pick a random item from the lists..
This way is the easiest one, but if you have a huge number of different types it can be very confusing..
the second way is "more general":
make 1 large map which holds from every card the right attribute as the key. Then when you need to select some from 1 type seek through the map and write every "good" item down to a temporary list.. now use that list to pick a random item.
This method is more slowly but (I think) less confusing and easier to manage.
#5
Posted 26 July 2006 - 11:16 PM
hmm well how do I get the cards to their game file thing? And how do I let them change the cards n their deckwell I think there are at least 2 easy ways you can do this.. All involve the use of data structures.
in the first way you make a different list for every type of card (common uncommon and rare). then you'll just pick a random item from the lists..
This way is the easiest one, but if you have a huge number of different types it can be very confusing..
the second way is "more general":
make 1 large map which holds from every card the right attribute as the key. Then when you need to select some from 1 type seek through the map and write every "good" item down to a temporary list.. now use that list to pick a random item.
This method is more slowly but (I think) less confusing and easier to manage.
#6
Posted 26 July 2006 - 11:52 PM
#7
Posted 26 July 2006 - 11:52 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











