We are about to switch to a new forum software. Until then we have removed the registration on this forum.
In my code, I have a chess engine, but when I play it, I usually never get to finish a game, because this error appears:
java.lang.ArrayIndexOutOfBoundsException: 63 at alight2.calculatevalue(alight2.java:193) at alight2.depthvalue(alight2.java:277) at alight2.depthvalue(alight2.java:238) at alight2.depthvalue(alight2.java:268) at alight2.depthvalue(alight2.java:238) at alight2.minimax(alight2.java:307) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at processing.core.PApplet.method(PApplet.java:3730) at processing.core.PApplet$2.run(PApplet.java:3768)
it is shown as red text in the console, and the game doesn't crash but the ai doesn't move. I have no idea what it is, and what caused it, but I do know that it only happens when the ai is running. I think it may be because I have a functions that calls itself over and over again, but that is the only way I know how to do minimax. Any help would be appreciated! files and data are in this link:https://drive.google.com/open?id=1RzAXEzEXAgAqDbRzOjX97ncquVZKYDYH same challenge as before, please just tell me what went wrong.