2020年12月22日星期二

Building a recursion algorithm to check a 2d array of words

I am trying to build a Sudoku game with letters instead of numbers. There will be boxes like the following: 3 by 3 box

And the user will try to find the right permutation of letters such that all horizontal and all vertical letters form words. One game mode is that the user can use a subset of letters to fill out the boxes. For this game, I am using a special word list from a txt file, so I cannot use a standard dictionary library. Here is an example of a correctly filled out puzzle:
completed puzzle

For this version of Sudoku made for scrabble players, oxo is a valid word. Anyway, how would I build an algorithm to check that the horizontal and all vertical letters form words?

https://stackoverflow.com/questions/65417822/building-a-recursion-algorithm-to-check-a-2d-array-of-words December 23, 2020 at 09:04AM

没有评论:

发表评论