Problems Encountered

  1. "Problem:" It wasn't a syntax error, but I was creating all the icons manually, which was super stupid. It created a lot more room for error, and I definitely did encounter human errors doing it. Relying on the computer to do it was much easier. 
    1. "Solution:" It wasn't that big of a deal, really, but I ended up just naming all the icons according to where they were going to be placed. Then, I could just use a for loop to initialize all the image icons. 
    2. What it means for the program: It made it a lot easier to program, which was definitely a good thing. It wasn't really that big of a problem, but oh well :D 
  2. Problem: When I ran my program, it crashed immediately before displaying anything. 
    1. Solution: The initialization array wasn't set to "array.length" it was set to a certain number, so I just changed it to "array.length" instead of "36" 
    2. What it means for the program: Nothing. It was just a stupid syntax error. 
  3. Problem: Throughout the entire blog, you will see the errors that I walked into. In the beginning, I thought I would make the names of the properties JLabels and then the pictures separate JLabels. But when I displayed the property name JLabel to the screen, it cut off. 
    1. Solution: I had to create a bunch of images for each property. It was kind of tedious, but at least it looks pretty now. 
    2. What it means for the program: It would look a lot more appealing. 
  4. Problem: Not being able to use a GridLayout to display the pictures because a gridLayout would include the middle which I don't want. 
    1. Solution: Change of plan - BorderLayout for the main panel; with 4 GridLayouts for each side. And then for the middle, a gridLayout for the buttons. 
    2. What it means for the program: It looks a lot better  - well, actually looks like monopoly!
  5. Problem: pictures are too big - can't display anything!
    1. Solution: Go back, and make them all smaller - and take screenshots of every single one of them to make it the size it is now. 
    2. What it means for the program: It's harder for the user to see the property because they will have to click it to enlarge it rather than just being able to see it. 
  6. Problem: Another logic error! EVERYTHING IS BEING DISPLAYED BACKWARDS FOR SOUTH AND WEST! 
    1. Solution: It wasn't until I realized that, in monopoly, you move from the beginning of north; to beginning of east; then the END of south; and the END of west. I kept forgetting that, so I added everything in the order you would play monopoly; so I have to add them into their arrays the opposite way - like moving backwards on a monopoly board. 
    2. What it means for the program: THE PICTURES ARE IN THE RIGHT ORDER! ;D
  7. Problem: While creating the coordinates for mouseClicked, it was very difficult to find out the empty spaces between the pawns. I had to refer to the Java API's to find out whether there was a method that I could use to set coordinates. And, when I used "setBounds", nothing worked! The pawn would still display in the middle!
    1. Solution: Not possible to solve - have to go about it in an entirely different way. There are two options: one of them, to just pop up a JOP (JOptionPane) telling the user that they are on __ property; and the same thing for the Com Pewter. Also, Ryk suggested to retake screenshots of each property with and without the pawns on both sides. So, I chose to do  the first thing. But they both have their ups and downs. Because I'm losing valuable time, and so I need to do it quickly. I will definitely take Ryk's suggestion and program it during the summer. 
    2. What it means for the program: Quite a bit, actually. It isn't going to be as user friendly as it might be if they could physically see where they were on the program. And if I had a lot more time, I would definitely have taken Ryk's suggestion. As said before, I will do that during the summer - and expand it to 8 players instead of 2. I look forward to expanding it...making it a lot more fun than it is now. It wouldn't be very playable with 8 people sharing a computer; but you know what? :P It doesn't matter. Just the relief that I get when I know that I finished it, is tremendous. Amazing feeling. 
  8. Problem: Haha - a funny one that may have actually sparked something. After the pawn movement, I landed on a room of requirement, and the program asked me if I wanted to purchase it :P 
    1. Solution: It was really stupid - for the JOP, a 0 is for a yes; and a 1 is for a no for a YES_NO_OPTION. And I mistyped 0 instead of 1; so everything was opposite for the playing part! I just went into the mouseClicked method, and changed that bit. 
    2. What it means for the program: Nothing, it was just a programming error. Though it might have sparked something cause I think it would be pretty funny if someone were to own those "cards" and would get a lot of money (though would have to pay a lot of money :P
  9. Problem: NoClassDefFound - crashed the program; couldn't run anything
    1. Solution: I have no idea. I just ran it again, and it worked. According to an outside article, it said that a lot of programmers can't solve it, and it can be caused by running the program before entirely compiling or running out of memory. 
    2. What it means for the program: Nothing, I hope. If I see it crash like that, I might freak out. Cause I don't have a clue how to solve it. o_O
  10. Problem: Infinite Loop: Computer will constantly go. When clicking on the "Go, Com Pewter" button, the Com Pewter just constantly goes, and goes, without stopping. 
    1. Solution:  The reason I put a loop around this was because if the user was stuck in jail, then the computer could two thrice. However, I couldn't find the solution, so I'm just forcing the user to pay the 50 galleon health fee in the beginning. 
    2. What it means for the program: This version of monopoly is going to lose another dimension...I wanted to make it as real as possible, but that will be another thing I'll change in the summer.
  11. Problem: When the program landed on the Com Pewter's property, the program just didn't do anything. 
    1. Solution: I used the wrong object in the array - just a quick fix
    2. What it means for the program: Nothing. 
  12. Problem: Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 36 at fandommonopoly.FandomMonopoly.mouseClicked(FandomMonopoly.java:5694) at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253) at java.awt.Component.processMouseEvent(Component.java:6385) at javax.swing.JComponent.processMouseEvent(JComponent.java:3275) at java.awt.Component.processEvent(Component.java:6147) at java.awt.Container.processEvent(Container.java:2083) at java.awt.Component.dispatchEventImpl(Component.java:4744) at java.awt.Container.dispatchEventImpl(Container.java:2141) at java.awt.Component.dispatchEvent(Component.java:4572) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4619) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4289) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4210) at java.awt.Container.dispatchEventImpl(Container.java:2127) at java.awt.Window.dispatchEventImpl(Window.java:2489) at java.awt.Component.dispatchEvent(Component.java:4572) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:710) at java.awt.EventQueue.access$400(EventQueue.java:82) at java.awt.EventQueue$2.run(EventQueue.java:669) at java.awt.EventQueue$2.run(EventQueue.java:667) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98) at java.awt.EventQueue$3.run(EventQueue.java:683) at java.awt.EventQueue$3.run(EventQueue.java:681) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.awt.EventQueue.dispatchEvent(EventQueue.java:680) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122 BUILD SUCCESSFUL (total time: 1 minute 13 seconds)
    1. Solution: The indexes for declaration should have been 36-48 not 37 - 49. Just a stupid error. 
    2. What it means for the program: Nothing.
  13. Problem: Refer to pictures
    1. SolutIon: There was a semicolon at the end of an if statement >_< 
    2. What it means for the program: Nothing. 
  14. As you can see, the program was asking the user whether they wanted to purchase properties such as Go to St. Mungos. 

    The Program, here was asking the user whether they wanted to buy room of requirement - which the program shouldn't.
Anyways, I will keep adding to this list, but I had to post those first. 

No comments:

Post a Comment