To create a noun type, you use the puzzle method given below. Note that the name of the noun type usually begins with an uppercase letter.
For every noun type in a puzzle, you must have the same number of nouns. To create a noun for a noun type, you use the puzzle method:
The brackets indicate that the title is optional. If you do provide a title for a noun, the title will appear in the chart and grids forms. The name and title are usually all lowercase unless it is a proper noun.
If given, the title is usually shorter than the name so it fits better in the forms.
let houses = this.addNounType("House"); let colors = this.addNounType("Color"); let nationalities = this.addNounType("Nationality"); let hobbies = this.addNounType("Hobby"); let pets = this.addNounType("Pet"); let drinks = this.addNounType("Drink");
You can see that the variables are defined using the let keyword, and that the variable names are usually lowercase names.
I prefer using let over var, but it probably does not make any difference when defining the noun types and nouns of the puzzle module.
let house1 = houses.addNoun("1st"); let house2 = houses.addNoun("2nd"); let house3 = houses.addNoun("3rd"); let house4 = houses.addNoun("4th"); let house5 = houses.addNoun("5th");
This article is part of the "Build Logic Puzzles" series. The next article in the series is "Build Verbs". Thank you.