Scratch that! I mean 42 :)
Anyways, I always have to expand my method just to get this information, so I thought I would just paste it here. It is pretty useless to anyone who wants to steal it, so...
//*******************************************************FIRST SIDE******************************
//Start Square:
square[0].owned = true;
square[0].mortgaged = false;
square[0].buy = 0;
square[0].houseHotel = 0;
square[0].turn = 0;
square[0].payOut = 200;
square[0].rent = 0;
square[0].houseRent = houses*(square[0].houseHotel);
square[0].housePrice = 0;
//Borgin and Burkes:
square [1].owned = false;
square [1].mortgaged = false;
square [1].buy = 60;
square [1].houseHotel = 0;
square [1].turn = 0;
square [1].payOut = 0;
square [1].rent = 20;
square [1].houseRent = houses*(square[1].houseHotel);
square [1].housePrice = 50;
//Room of Requirement/Pick up a RoR Card:
square [2].owned = true;
square [2].mortgaged = false;
square [2].buy = 0;
square [2].houseHotel = 0;
square [2].turn = 0;
square [2].payOut = 0;
square [2].rent = 0;
square [2].houseRent = houses*(square[2].houseHotel);
square [2].housePrice = 50;
//Roland Kerr College:
square [3].owned = false;
square [3].mortgaged = false;
square [3].buy = 60;
square [3].houseHotel = 0;
square [3].turn = 0;
square [3].payOut = 0;
square [3].rent = 20;
square [3].houseRent = houses*(square[3].houseHotel);
square [3].housePrice = 50;
//Camelot Annual Tax:
square [4].owned = true;
square [4].mortgaged = false;
square [4].buy = 0;
square [4].houseHotel = 0;
square [4].turn = 0;
square [4].payOut = 0;
square [4].rent = 200;
square [4].houseRent = houses*(square[4].houseHotel);
square [4].housePrice = 0;
//Tardis
square [5].owned = false;
square [5].mortgaged = false;
square [5].buy = 200;
square [5].houseHotel = 0;
square [5].turn = 0;
square [5].payOut = 0;
square [5].rent = 25;
square [5].houseRent = houses*(square[5].houseHotel);
square [5].housePrice = 0;
//Redhaven Property
square [6].owned = false;
square [6].mortgaged = false;
square [6].buy = 100;
square [6].houseHotel = 0;
square [6].turn = 0;
square [6].payOut = 0;
square [6].rent = 80;
square [6].houseRent = houses*(square[6].houseHotel);
square [6].housePrice = 50;
//Room of Requirement/Pick up a RoR Card:
square [7].owned = true;
square [7].mortgaged = false;
square [7].buy = 0;
square [7].houseHotel = 0;
square [7].turn = 0;
square [7].payOut = 0;
square [7].rent = 0;
square [7].houseRent = houses*(square[7].houseHotel);
square [7].housePrice = 0;
//Piccadilly Circus
square [8].owned = false;
square [8].mortgaged = false;
square [8].buy = 100;
square [8].houseHotel = 0;
square [8].turn = 0;
square [8].payOut = 0;
square [8].rent = 60;
square [8].houseRent = houses*(square[8].houseHotel);
square [8].housePrice = 50;
//**********************************************************************Start of New Side*******************************************
//St Mungo
square [9].owned = true;
square [9].mortgaged = false;
square [9].buy = 0;
square [9].houseHotel = 0;
square [9].turn = 0;
square [9].payOut = 0;
square [9].rent = 0;
square [9].houseRent = houses*(square[9].houseHotel);
square [9].housePrice = 0;
//Platform 9 and 3/4 Quarters.
square [10].owned = false;
square [10].mortgaged = false;
square [10].buy = 120;
square [10].houseHotel = 0;
square [10].turn = 0;
square [10].payOut = 0;
square [10].rent = 60;
square [10].houseRent = houses*(square[10].houseHotel);
square [10].housePrice = 50;
//Speedy's Cafe in Sherlock
square [11].owned = false;
square [11].mortgaged = false;
square [11].buy = 140;
square [11].houseHotel = 0;
square [11].turn = 0;
square [11].payOut = 0;
square [11].rent = 65;
square [11].houseRent = houses*(square[11].houseHotel);
square [11].housePrice = 75;
//Lake of Avalon
square [12].owned = false;
square [12].mortgaged = false;
square [12].buy = 150;
square [12].houseHotel = 0;
square [12].turn = 0;
square [12].payOut = 0;
square [12].rent = (2*(die1+die2));
square [12].houseRent = houses*(square[12].houseHotel);
square [12].housePrice = 0;
//Isengard
square [13].owned = false;
square [13].mortgaged = false;
square [13].buy = 140;
square [13].houseHotel = 0;
square [13].turn = 0;
square [13].payOut = 0;
square [13].rent = 70;
square [13].houseRent = houses*(square[13].houseHotel);
square [13].housePrice = 75;
//Taxi:
square [14].owned = false;
square [14].mortgaged = false;
square [14].buy = 200;
square [14].houseHotel = 0;
square [14].turn = 0;
square [14].payOut = 0;
square [14].rent = 25;
square [14].houseRent = houses*(square[14].houseHotel);
square [14].housePrice = 0;
//Grimmauld Place:
square [15].owned = false;
square [15].mortgaged = false;
square [15].buy = 160;
square [15].houseHotel = 0;
square [15].turn = 0;
square [15].payOut = 0;
square [15].rent = 50;
square [15].houseRent = houses*(square[15].houseHotel);
square [15].housePrice = 75;
//Room of Requirement/Pick up a RoR Card:
square [16].owned = true;
square [16].mortgaged = false;
square [16].buy = 0;
square [16].houseHotel = 0;
square [16].turn = 0;
square [16].payOut = 0;
square [16].rent = 0;
square [16].houseRent = houses*(square[16].houseHotel);
square [16].housePrice = 0;
//Quidditch Pitch
square [17].owned = false;
square [17].mortgaged = false;
square [17].buy = 180;
square [17].houseHotel = 0;
square [17].turn = 0;
square [17].payOut = 0;
square [17].rent = 70;
square [17].houseRent = houses*(square[17].houseHotel);
square [17].housePrice = 75;
//**********************************************START OF NEW SIDE****************************************************
//The Tavern (Free Parking)
square [18].owned = true;
square [18].mortgaged = false;
square [18].buy = 0;
square [18].houseHotel = 0;
square [18].turn = 0;
square [18].payOut = pot;
square [18].rent = 0;
square [18].houseRent = houses*(square[18].houseHotel);
square [18].housePrice = 0;
//Hagrid's Hut
square [19].owned = false;
square [19].mortgaged = false;
square [19].buy = 220;
square [19].houseHotel = 0;
square [19].turn = 0;
square [19].payOut = 0;
square [19].rent = 75;
square [19].houseRent = houses*(square[19].houseHotel);
square [19].housePrice = 90;
//Room of Requirement/Pick up a RoR Card:
square [20].owned = true;
square [20].mortgaged = false;
square [20].buy = 0;
square [20].houseHotel = 0;
square [20].turn = 0;
square [20].payOut = 0;
square [20].rent = 0;
square [20].houseRent = houses*(square[20].houseHotel);
square [20].housePrice = 0;
//Aslan's Country
square [21].owned = false;
square [21].mortgaged = false;
square [21].buy = 220;
square [21].houseHotel = 0;
square [21].turn = 0;
square [21].payOut = 0;
square [21].rent = 75;
square [21].houseRent = houses*(square[21].houseHotel);
square [21].housePrice = 90;
//Enter Wardrobe
square [22].owned = false;
square [22].mortgaged = false;
square [22].buy = 200;
square [22].houseHotel = 0;
square [22].turn = 0;
square [22].payOut = 0;
square [22].rent = 25;
square [22].houseRent = houses*(square[22].houseHotel);
square [22].housePrice = 90;
//221 Baker Street
square [23].owned = false;
square [23].mortgaged = false;
square [23].buy = 240;
square [23].houseHotel = 0;
square [23].turn = 0;
square [23].payOut = 0;
square [23].rent = 75;
square [23].houseRent = houses*(square[23].houseHotel);
square [23].housePrice = 90;
//Northumberland Street
square [24].owned = false;
square [24].mortgaged = false;
square [24].buy = 260;
square [24].houseHotel = 0;
square [24].turn = 0;
square [24].payOut = 0;
square [24].rent = 70;
square [24].houseRent = houses*(square[24].houseHotel);
square [24].housePrice = 90;
//Beaversdam
square [25].owned = false;
square [25].mortgaged = false;
square [25].buy = 150;
square [25].houseHotel = 0;
square [25].turn = 0;
square [25].payOut = 0;
square [25].rent = 2*(die1+die2);
square [25].houseRent = houses*(square[25].houseHotel);
square [25].housePrice = 90;
//Ministry of Magic
square [26].owned = false;
square [26].mortgaged = false;
square [26].buy = 280;
square [26].houseHotel = 0;
square [26].turn = 0;
square [26].payOut = 0;
square [26].rent = 75;
square [26].houseRent = houses*(square[26].houseHotel);
square [26].housePrice = 90;
//********************************************************LAST LINE***************************************************
//Go to Jail.
square [27].owned = true;
square [27].mortgaged = false;
square [27].buy = 0;
square [27].houseHotel = 0;
square [27].turn = 0;
square [27].payOut = 0;
square [27].rent = 0;
square [27].houseRent = 0;
square [27].housePrice = 0;
//Mordor
square [28].owned = false;
square [28].mortgaged = false;
square [28].buy = 300;
square [28].houseHotel = 0;
square [28].turn = 0;
square [28].payOut = 0;
square [28].rent = 80;
square [28].houseRent = houses*(square[28].houseHotel);
square [28].housePrice = 100;
//Bagshot Row
square [29].owned = false;
square [29].mortgaged = false;
square [29].buy = 300;
square [29].houseHotel = 0;
square [29].turn = 0;
square [29].payOut = 0;
square [29].rent = 80;
square [29].houseRent = houses*(square[29].houseHotel);
square [29].housePrice = 100;
//Room of Requirement
square [30].owned = true;
square [30].mortgaged = false;
square [30].buy = 0;
square [30].houseHotel = 0;
square [30].turn = 0;
square [30].payOut = 0;
square [30].rent = 0;
square [30].houseRent = houses*(square[30].houseHotel);
square [30].housePrice = 0;
//Hogwarts Express
square [31].owned = false;
square [31].mortgaged = false;
square [31].buy = 200;
square [31].houseHotel = 0;
square [31].turn = 0;
square [31].payOut = 0;
square [31].rent = 25;
square [31].houseRent = houses*(square[31].houseHotel);
square [31].housePrice = 0;
//Ealdor
square [32].owned = false;
square [32].mortgaged = false;
square [32].buy = 320;
square [32].houseHotel = 0;
square [32].turn = 0;
square [32].payOut = 0;
square [32].rent = 85;
square [32].houseRent = houses*(square[32].houseHotel);
square [32].housePrice = 100;
//Room of Requirement
square [33].owned = true;
square [33].mortgaged = false;
square [33].buy = 0;
square [33].houseHotel = 0;
square [33].turn = 0;
square [33].payOut = 0;
square [33].rent = 0;
square [33].houseRent = houses*(square[33].houseHotel);
square [33].housePrice = 0;
//Camelot's Citadel
square [34].owned = false;
square [34].mortgaged = false;
square [34].buy = 350;
square [34].houseHotel = 0;
square [34].turn = 0;
square [34].payOut = 0;
square [34].rent = 100;
square [34].houseRent = houses*(square[34].houseHotel);
square [34].housePrice = 200;
//Hogwarts
square [35].owned = false;
square [35].mortgaged = false;
square [35].buy = 400;
square [35].houseHotel = 0;
square [35].turn = 0;
square [35].payOut = 0;
square [35].rent = 100;
square [35].houseRent = houses*(square[35].houseHotel);
square [35].housePrice = 200;
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!
Monday, 27 May 2013
Houses and Hotels.
I talked to Ryk about the possibility of not getting houses and hotels. He said that it was possible to just increase the rent 4 times (just like the houses).
So I'm altering the program in a way that if their opponent lands on the one of the user's properties, the rent will stay the same the first time. Then the second time the computer lands on their property, the rent will double. Then the third time the computer lands on the property, the rent will triple the original. The fourth time the computer lands on the property, the rent will quadruple the original. However, after this, the rent will no longer increase.
HURRAY :)
Ryk, have fun reading 41 posts :D
So I'm altering the program in a way that if their opponent lands on the one of the user's properties, the rent will stay the same the first time. Then the second time the computer lands on their property, the rent will double. Then the third time the computer lands on the property, the rent will triple the original. The fourth time the computer lands on the property, the rent will quadruple the original. However, after this, the rent will no longer increase.
HURRAY :)
Ryk, have fun reading 41 posts :D
STUPID BLOODY BIOLOGY!
UGH! Fudging biology...test today - and it's putting everything off. I should be programming! Well, I am now, but again, I'm behind schedule!
That's the downside of having a student teacher who has almost no idea what she's teaching cause she cannot answer extra questions that well; and testing on things that go into way toooo much detail! How on earth am I supposed to memorize the a chart that has a bunch of random words.
This is why I like computer science, the more you use something, you just memorize it. You do not have to try to memorize something!
Anyways, back to computer science. I'm current programming the room of requirement that goes inside of the mouseClicked method; cause I have to finish taking off all the points from the user and displaying how much they have by today. And then probably doing the same for the computer for tomorrow.
So I've started programming the north button pressing. This will take off money from both computer and user bank account:
![]() |
So this is obviously, what happens when you click on the property. I'm going to have to find a way to make sure that the user can't buy a property that they aren't on, so that's another thing that I have to do. |
![]() |
Here, I'm clicking the button. |
![]() |
This is what prints on the screen telling the user that we have given then 200 galleons. |
![]() |
This will show up on every screen - which tells the user how much money each person has. |
![]() |
This is an example of pressing the Room of Requirement button. |
![]() |
You will not always get this option, it is on a random number generator; that has up to 8 options for now. Time permitting, there may be more, but there are 8 for now. |
![]() |
As said before, this screen is always going to pop up after buying or picking up a card. |
![]() |
Another round of room of requirement if you land on it a second time. |
![]() |
This is another possible outcome, there are 6 more :) |
![]() |
As said before, this will display whenever a button is pressed! |
Saturday, 25 May 2013
Hard Deadlines
Going to finish all the JOptionPanes by Monday.
Going to finish all the pawn movement by Wednesday.
And decide and finish all the houses and hotel business by Saturday.
Culminating time, tons of stuff to do, and not enough time to run around like a chicken.
Although I wish I could.
I wish I worked with Sherlock and chased taxis.
Or went to Hogwarts to study stuff at Hogwarts.
Oh well, life is life.
Going to finish all the pawn movement by Wednesday.
And decide and finish all the houses and hotel business by Saturday.
Culminating time, tons of stuff to do, and not enough time to run around like a chicken.
Although I wish I could.
I wish I worked with Sherlock and chased taxis.
Or went to Hogwarts to study stuff at Hogwarts.
Oh well, life is life.
Friday, 24 May 2013
Forgot to post yesterday!
Ryk found out what the error was. The JOptionPane was showing up on the screen, but somewhere off the screen. So he said to specify the panel instead of the null inside the declaration of the JOptionPane.
AND IT WORKED!
It's always one word -__-
AND IT WORKED!
It's always one word -__-
Thursday, 23 May 2013
Buying Properties
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.
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.
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)
Wednesday, 22 May 2013
Placement of Pawns: North and South
HEEERE GOES!
For the north boundary, the screen size is 1200. There are 10 JLabels on the top row. The size is 114 by 80. But I think I'm going to add about 5 pixels of extra room just in case because there is quite a bit of white space.
Therefore, for the north boundary, the x-value would start at (40) and would start at y-value (30) <-- give or take a few.
Start Adventure --> (30, 40)
Borgin and Burkes --> (149, 40)
Room of Requirement --> (263, 40)
Roland Kerr College --> (378, 40)
Camelot's Annual Tax --> (491, 40)
Tardis --> (605, 40)
Redhaven --> (719, 40)
Room of Requirement --> (833, 40)
Piccadilly Circus --> (947, 40)
St. Mungos' Hospital --> (1061, 40)
For the east boundary, the length of the screen size is 1200 but there is a lot less room.
Platform 9 and 3/4: (30, 20)
Speedy's Cafe: (30, 100)
Avalon: (30, 180)
Isengard: (30, 260)
Taxi: (30, 340)
Grimmauld Place: (30, 420)
Room of Requirement: (30, 500)
Quidditch Pitch: (30, 580)
For the north boundary, the screen size is 1200. There are 10 JLabels on the top row. The size is 114 by 80. But I think I'm going to add about 5 pixels of extra room just in case because there is quite a bit of white space.
Therefore, for the north boundary, the x-value would start at (40) and would start at y-value (30) <-- give or take a few.
Start Adventure --> (30, 40)
Borgin and Burkes --> (149, 40)
Room of Requirement --> (263, 40)
Roland Kerr College --> (378, 40)
Camelot's Annual Tax --> (491, 40)
Tardis --> (605, 40)
Redhaven --> (719, 40)
Room of Requirement --> (833, 40)
Piccadilly Circus --> (947, 40)
St. Mungos' Hospital --> (1061, 40)
For the east boundary, the length of the screen size is 1200 but there is a lot less room.
Platform 9 and 3/4: (30, 20)
Speedy's Cafe: (30, 100)
Avalon: (30, 180)
Isengard: (30, 260)
Taxi: (30, 340)
Grimmauld Place: (30, 420)
Room of Requirement: (30, 500)
Quidditch Pitch: (30, 580)
Subscribe to:
Posts (Atom)