Skip to content

Commit

Permalink
density
Browse files Browse the repository at this point in the history
  • Loading branch information
bcg2488 committed Apr 30, 2024
1 parent cdaf30e commit ca26410
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/uta/cse3310/WordBank.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void generateGrid(int rows, int cols, List<String> wordList) {
for (String word : wordList) {
boolean wordPlaced = false;
int attempts = 0;
while (!wordPlaced && attempts < 15) {
while (!wordPlaced && attempts < 20) {
int row = random.nextInt(rows);
int col = random.nextInt(cols);

Expand Down Expand Up @@ -237,6 +237,8 @@ public void generateGrid(int rows, int cols, List<String> wordList) {
// for (String word : wordsPlaced) {
// System.out.println(word);
// }
//System.out.println("Words Placed:");
//System.out.println(wordsPlaced.size());

fillEmptyCells(rows, cols);
//printGrid();
Expand Down

0 comments on commit ca26410

Please sign in to comment.