1.1.1 • Published 2 years ago

higher-lower-game v1.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

The Higher or Lower Game

Functions

  • .start(id, options) - start a new game.

    1. id - any string that identifies the current game.
    2. options - an object
      • basedOn (optional, if not provided a random one will be chosen).
  • .next(id) - go to the next stage.

  • .check(id, condition) - check if the guess was right.
    • condition - a boolean, true for high and false for low.
  • .end(id) - end a game.

Example Uses

const hlg = require("higher-lower-game")
const game = new hlg()

let game_data = await game.start('game_id', {
    basedOn: '2'//you can use name here too.
})// start a new game with the id "game_id"
console.log(game_data)

let new_game_data = await game.next('game_id')
console.log(new_game_data)

await game.end('game_id')

Example Application

Based-On

1: google_search

2: youtube_subscriber

3: youtube_view

4: website_visit

5: twitch_follower

6: rich_people

7: high_salary

8: country_size

9: country_population

10: country_population_density

11: imdb_rating_movie

12: imdb_rating_series

13: movie_cost

14: movie_cost_inflation

15: movie_collection

16: actor_charge

17: tomatometer_score

18: instagram_follower

19: spotify_listener

1.1.1

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago