+1 vote

I'm making a scrabble rpg and i want to know how i can put a whole dictionary in the game and then recognize if the word formed it's valid (if coincides with a word of that dictionary).
enter image description here

in Engine by (122 points)
edited by

1 Answer

+1 vote
Best answer

you can use a *.txt file like this :
Each line would be a word, using File.get_line() you will be able to fill a dictionary ( that you will have to define on the beginning) using append(line)
Once you have the dictionary its just a matter of looking for the word in there ( you can sort it by length that will make it easier )

by (118 points)
selected by

It worked. Thank you!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.