This site requires JavaScript, please enable it in your browser!
Greenfoot back

danpost's Comments

Back to danpost's profile

danpostdanpost

2012/3/20

First off, in the world class, move what you have in the act method up into the constructor where those statements belong. Secondly, why, in the world class, are you adding this.getWidth() and this.getHeight() (which are returning the width and height of your world) to the x and y of where you are adding the objects into the world at? That will place them outside of your world (that is why they all appear at the lower right corner of your world window).
danpostdanpost

2012/3/20

Couple of things that could have made making this a lot easier (1) Using a grid size of 24 would have saved a lot of calculations (other advantages as well) (2) Using block as background and adding a plain gray square (Pad) for each area of path (instead of blocking non-path, and leaving path empty). This way, when moved, if (getIntersectingObjects(Pad.class) != null), then good move else not (avoids checking if valid location and referring to original array in world class). Also, the Pad.class objects could have instance variables to track number of direction choices from it, as well as, if checked for real path, and if is actual path or not. Another thing you could do, is use a double int array instead of a single int array (int[][] as opposed to int[]) for the lvlArray. With that lvlArray.length() would be the number of rows and lvlArray[0].length() would be the number of columns. These suggestions would allow you to create more levels with ease (at least the grid-size one, and the double int one)
Thanks, kiarocks.
@kiarocks, I could not say for sure about you using java 6 being the issue. As far as the 'theta' symbol, I think it would be best for me to resolve the stack space issue first, as making things more complicated and adding more method calls would just add insult to injury, if you know what I mean. I already have methods calling methods, that recall methods, etc. to parse formulas input by users.
I have not seen that! In Greenfoot on my computer, in the .jar application, nor on the site. If anyone else experiences what kiarocks has, please advise. Thanks in advance.
For extreme expressions (either very long or very complicated), I did get some stack overflow errors. Probably need to increase the stack space for this one. I did like the effect of y = cos(x^2) out past x = 50 through 270 or so.
Anybody else notice any 'glitching out' in edit mode? If so, please, please, explain exactly how it is 'glitching out', so I hopefully could re-produce it, and find and fix the problem.
@kiarocks, what do you mean by 'it glitches out a lot'? If you are referring to the fact that it will not take certain keys at certain times, then it was meant to be that way. All operations must be included in the entering (ex. '300sin(x/250)' will not be accepted, but '300[b]*[/b]sin(x/250)' will). If that is not what you posted about, please explain.
Would be nice to show dealers cards after 'Stand'ing. Also, would be more realistic if the same card did not keep showing up. Could create the full shuffled deck, removing used cards during play, until cards remaining is less than 12 or so, then remove all cards, and create a new shuffled deck.