所以我有一个由用户估算的字符串数组列表。我还有一个二维字符数组:私人字符[][]拼图;我需要帮助将字符串更改为字符,以便我可以将它们输入到二维数组中有人可以帮忙吗?
public class WordSearchPuzzle
{
private char[][] puzzle ;
private ArrayList<String> puzzleWords ;
private int letterCount = 0 ;
private int gridDimensions;
public WordSearchPuzzle(ArrayList<String> userSpecifiedWords)
{
this.puzzleWords = userSpecifiedWords ;
}
private void createPuzzleGrid()
{
int i;
for(i = 0; i < puzzleWords.size() ; i++){
letterCount = puzzleWords.size() + letterCount ;
}
gridDimensions = letterCount * 2;
puzzle = new char[gridDimensions][gridDimensions] ;
}