Skip to content

Instantly share code, notes, and snippets.

@caspar
Last active December 30, 2015 09:59
Show Gist options
  • Save caspar/7813045 to your computer and use it in GitHub Desktop.
Save caspar/7813045 to your computer and use it in GitHub Desktop.
Fill in the blank spaces in Wordsearch.java with random letter (char-s).
import java.util.*;
Random R = new Random();
public void FillIn(){
for (int x = 0; x < columns; x++)
for (int y = 0; y < rows; y++)
if (board[x][y] == '-')
board[x][y] = (char)(R.nextInt(26 + 'a');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment