So, i’m considering turning a (existing) board game into a videogame via Processing. The game is called Machi Koro; if you know it: cool, if you don’t know it: It’s a quick board game where you buy buildings (which are on cards). All cards have a number on them, and if you roll the number in your turn, the buildings effect activates (you get money in most cases). The goal is to buy all of your 4 big projects, which all cost a lot of money.
I’m already having a lot of plans, but something that is really gonna be a problem: I want to keep track of each players cards (i want to get up to 4 players), without making a variable for EVERY kind of card for EVERY player (there are somewhere between 10 and 20 kinds of buildings, so i would end up with 40 to 80 variables in total). Is there any trick that lets me reduce the number of required variables, even with up to 4 players? Or is there no way around it?
1 Like
You can use ArrayList or HashMap!
(that’s all I can say if you don’t have a code to begin with )
I second @micuat’s advice.
My advice; start coding! While this optimization might seem like a hurdle now, it’s sometimes better to write code rather than overthink things (especially with a smaller project like this).
I would recommend using a player class and a card so that each player would have a list of card and u can keep a better track of card
2 Likes