Skip to content

Commit

Permalink
Updated test cases to validate the new functionality of randomly plac…
Browse files Browse the repository at this point in the history
…ing words on the grid in the GridField class
  • Loading branch information
2onefan2 committed Apr 28, 2024
1 parent bacd12f commit 99f1aca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/java/uta/cse3310/GridFieldTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,10 @@ public void testPlaceRandomWords() {
// Check if the grid size is within a reasonable range
assertTrue(grid.length >= 5 && grid.length <= 10);
assertTrue(grid[0].length >= 5 && grid[0].length <= 10);

// Check if all words from the word list are placed on the grid
for (String word : wordList) {
assertTrue(gridField.checkWord(word));
}
}
}

0 comments on commit 99f1aca

Please sign in to comment.