Your Welcome.
Chris
Type: Posts; User: Freaky Chris
Your Welcome.
Chris
{{2,3}}
This is an Array that looks like this,
[ 2 ] [ 3 ]
the two is stored in initialGrid[0][0] and the 3 in initialGrid[0][1]
so you would do this,
x = initialGrid[0][0];
x = initialGrid.length;
y = initialGrid[x-1].length;
This will store the length of the first dimension, ie number of slots it has into x and the length of the second demension along the (x-1)'th...
You are more than welcome, I'm glad I could help.
If it's solved would you be as kind as to mark this as solved
Thanks,
Chris
bruint, you do not require
public static void main(String[] args){
new FifteenPuzzle(new int[1][2]);
}
That section was ment for JavaPF. You only needed to make the x to x-1...
BlueJ allows you to specify the program entry point. Thus no main function is required.
Add this to the FifteenPuzzle class,
public static void main(String[] args){
new FifteenPuzzle(new...
Hi, I do not understand your problem exactly, but I think this may be the problem.
x = initialGrid.length;
y = initialGrid[x].length;
initialGrid[x] is out of bouds, the upper bound to...
You'll have to excuse me for a couple of hours as I have to go to college. When I am there and have a bit of spare time I'll get back to you hopefully with a solution
chris
Without all of the code, we cannot compile and run it. So if you can please post all of the code including SimpleCanvas class. If you cannot do that for some reason then please Post the exact error...