Constructor
new Word()
Properties:
Name | Type | Description |
---|---|---|
data |
Array.<Tri> | the private array of Tris that make up the word |
- Source:
Classes
Methods
readWord() → {Array.<Tri>}
Return the data array stored in the word to read their states
- Source:
Returns:
- the array of Tris stored in the word
- Type
- Array.<Tri>
toString() → {string}
Return a string representation of the word. The string is the
concatenation of the states of the Tris in the word
- Source:
Returns:
- a string representation of the word
- Type
- string
writeWord(data)
Write an array of Tris to the word. The array must be of size WORD_SIZE
Parameters:
Name | Type | Description |
---|---|---|
data |
Array.<Tri> | the array of Tris to write to the word |
- Source:
Throws:
-
- if the array is not of size WORD_SIZE
- Type
- Error