I’m currently writing a scrabble-like game in C#. I can get the computer to find the highest point value word that can be made using the current rack, however I have no idea how to check if that word is “Placeable” on the 15*15 Gameboard(2D Array: string[,]).
In it’s default state(with no Letters on the board) all elements are set to 0.
Is allowed
---------------
-------H-------
-------E-------
-----FILL------
-------L-------
-------O-------
---------------
How can I check if the word is not For example:
Is Not Allowed
---------------
-H-------------
-E-------------
FILL------------ <-- F is out of bounds
-L-------------
-O-------------
---------------
Is Not Allowed
---------------
-H-------------
-E-W-----------
-L-O-----------
-L-R-----------
FOLL----------- <-- Fill is overlapping with O
---D-----------
The paper, “The worlds fastest Scrabble engine” (PDF), is from 1988 and describes an efficient Scrabble engine. It’s short and surprisingly readable!