I haven't sorted out the buying properties part either. I'm working that along with the pawns.
Although I'm doing the purchasing of properties first. So, basically if any of the buttons are pressed saying "Buy Property"; for example, the price of the property will be taken off of the user's account. On top of it, the property that they have purchased will change to "true" for owned and so the computer cannot buy that property, too. They may land on it accidentally and be forced to pay rent.
And I've run into a weird error. Cause in the mouseListener, I am testing it to see if the user presses it. So, if it is pressed, a certain thing will happen. An example of this:
For the "I'm going on an adventure!" square, the user is supposed to gain 200 galleons. It seems not-really-user-friendly to just take it off their gringotts account without telling them, so I created a JOptionPanel to let them know so that they could just press okay or something. But it isn't working. The JOptionPane is making the program well, just die, really. It prints out what is in the if statement into the console window. And that's perfectly good, but the user kind of needs to know how much money they have!
Oh. I see. Unless I put a JLabel in the centre showing the amount of money he or she has. But it looks much better in the JOptionPane so I'm going to try to get that working first.
No comments:
Post a Comment