Skip to content

Commit

Permalink
Added Timer
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudy-Orozco committed Apr 26, 2024
1 parent f73fa67 commit b17f019
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/main/java/uta/cse3310/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,15 @@ public boolean verifyWord(int[] coord1, int[] coord2, Vector<Word> testTotalWord
int[] c2 = w.getCoord2();
System.out.println(w.getWord() + " " + Arrays.toString(c2) + Arrays.toString(c1));

if( ((coord1[0] >= c2[0] - 2) && (coord1[0] >= c2[0] + 2)) &&
((coord1[1] >= c2[1] - 2) && (coord1[1] >= c2[1] + 2)) &&
((coord2[0] >= c1[0] - 2) && (coord2[0] >= c1[0] + 2)) &&
((coord2[0] >= c1[1] - 2) && (coord2[0] >= c1[1] + 2))) {
result = true;
break;
if(((coord1[0] >= c2[0] - 0) && (coord1[0] <= c2[0] + 0) && (coord1[1] >= c2[1] - 0) && (coord1[1] <= c2[1] + 0)) &&
((coord2[0] >= c1[0] - 0) && (coord2[0] <= c1[0] + 0) && (coord2[1] >= c1[1] - 0) && (coord2[1] <= c1[1] + 0))) {
System.out.println("Found Word");
if(w.foundorNot() == false)
{
result = true;
w.setTrue();
break;
}
}
}
}
Expand All @@ -179,6 +182,7 @@ public boolean verifyWord(int[] coord1, int[] coord2, Vector<Word> testTotalWord
{
result = true;
w.setTrue();
break;
}
}
}
Expand Down

0 comments on commit b17f019

Please sign in to comment.