Skip to content

Commit

Permalink
Fixed game logic
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmv30 committed May 1, 2024
1 parent 08a6652 commit d1e00cb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/uta/cse3310/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ boolean isValidWord(ArrayList<Coordinate> indexLetters, String Userid, Leaderboa
//If it is valid return true
if (valid_words.contains(word))
{
for (int i = 0; i < ID.size(); i++)
{
if (identified_words.contains(i+word))
{
return false;
}
}
//Add the word and the index of the id in the beginning of the word
identified_words.add(ID.indexOf(Userid)+word);
LB.update(Userid,10);
Expand Down

0 comments on commit d1e00cb

Please sign in to comment.