Okay Thanks anyway for your help!
Type: Posts; User: Extremist252
Okay Thanks anyway for your help!
I'm afraid not,i don't have a main method to do so and i won't be able to make it because i'm 15 mins away from handing the project over :S
--- Update ---
i commented on what i'm doing beside...
this is another code i came up with but the output is always -1
public int getWinner() {
boolean flagWhite=false;//checks if the white pieces are connected
boolean flagBlack=false;//checks if the...
it always point to the recursive call (connected(up)) and all the other points..
what do u think about the iterative implementation? forget about the recursive one
public int connected(Point test){
ArrayList<Point> connection=new ArrayList<Point>();/ used to check if i visited these points before or not
Point upLeft=new Point(test.getX()-1,test.getY()-1);...
public int connected(Point test){
ArrayList<Point> connection=new ArrayList<Point>();
Point upLeft=new Point(test.getX()-1,test.getY()-1);
Point up=new Point(test.getX(),test.getY()-1);
Point...
Hey guys,
My projects's deadline is 1 hour away and i need to know what are the base cases that i should do while searching in a 2 array for connected pieces so i basically use a DFS but i don't...