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.
Welcome! Fandoms in the monopoly include Doctor Who, Sherlock, Merlin, Harry Potter, Lord of the Rings and Narnia. You'll see milestones while coding, errors that I have encountered, an "environmental message" , "computer science and careers" that might relate to this program, and how emerging areas of computer science might benefit from this program. Other things include errors that were encountered, the brainstorming before coding. Ryk, happy reading!
Thursday, 23 May 2013
Placement of Pawns: South and West
ONTO THE SOUTH PART OF THE PROGRAM!
Tavern: (1061, 580)
Hagrid's Hut: (947, 580)
Room of Requirement: (883, 580)
Aslan's Country: (719, 580)
Wardrobe: (605, 580)
221 B Baker Street: (491, 580)
Northumberland Street: (378, 580)
Beaversdam: (263, 580)
Ministry of Magic: (149, 580)
Go to St. Mungos': (30, 580)
ONTO THE WEST PART OF THE PROGRAM!
Mordor: (30, 580)
Bagshot Row: (30, 500)
Room of Requirement: (30, 420)
Hogwarts Express: (30, 340)
The Ealdor: (30, 260)
Room of Requirement: (30, 180)
The Citadel: (30, 100)
Hogwarts: (30, 20)
Tavern: (1061, 580)
Hagrid's Hut: (947, 580)
Room of Requirement: (883, 580)
Aslan's Country: (719, 580)
Wardrobe: (605, 580)
221 B Baker Street: (491, 580)
Northumberland Street: (378, 580)
Beaversdam: (263, 580)
Ministry of Magic: (149, 580)
Go to St. Mungos': (30, 580)
ONTO THE WEST PART OF THE PROGRAM!
Mordor: (30, 580)
Bagshot Row: (30, 500)
Room of Requirement: (30, 420)
Hogwarts Express: (30, 340)
The Ealdor: (30, 260)
Room of Requirement: (30, 180)
The Citadel: (30, 100)
Hogwarts: (30, 20)
Subscribe to:
Posts (Atom)