1.0.9 • Published 4 years ago

hunting-words v1.0.9

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

hunting-words

Package of functions that help to create hunting word game.

How to use?

npm i hunting-words
const { createGame } = require('hunting-words');

const options = {
    wordsCross:false, 
    inverseWord:true, 
    wordInVertical:true,
    wordInHorizontal:true, 
    wordDiagonalLeft: false, 
    wordDiagonalRight: false
};

let game = createGame(10, 10, ["word1","word2","word3"], options);
  • createGame(rows, columns, words, options): Return
    • rows -> number of word search lines
    • columns -> columns of word search lines
    • words -> array of words that will be in the word search
    • options -> json object that contains the game preferences

Return

{
  board: array<array<createLetter>> 
  words: array<string> ["word1", "word2", "word3"],
  rows: 10,
  columns: 10,
}

createLetter

{
  letter: "C"
  word: []
  row: 0
  column: 0
  isSelected: false
  addNewWord: ƒ (word)
  setLetter: ƒ (letter)
  setRow: ƒ (row)
  setColumn: ƒ (column)
  setIsSelected: ƒ (isSelected)
}
Contributor
rogeriomattos
TigreDoMexico
1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago