posted 13 years ago
Hello to the forum,
I have a 2D array with JButtons.
Im trying to build a method that starting from a square on last row by clicking another square will check if those both are connected or not (path of specific ImageIcon). Squares that you can stand on called Stones and squares that connect Stones called Bridge. Here is my method so far:
Cordinate is a class that takes two integers (x,y) and add(Cordinate c) takes the current Cordinate element and add it on x and y variables (So if found bridge move to the next square)
Now, my problem. If there is a Bridge element in front (Cordinate(-1,0)) everything working excelent, but if is not then trying to scan others and here something going wrong and never move on. Look System.out debugging i have to understand
If anyone find what going on....then is Mastermind :P