wordle-cli
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -24,2 +24,5 @@ const getOptions = () => { | ||
break | ||
case 'g': | ||
options['guesses'] = flagSplit[1] | ||
break | ||
case 'd': | ||
@@ -38,2 +41,6 @@ options['date'] = flagSplit[1] | ||
// Check guesses option | ||
if (options.guesses == '0') options.unlimited = true | ||
if (!parseInt(options.guesses)) delete options.guesses | ||
return options | ||
@@ -40,0 +47,0 @@ } |
@@ -10,4 +10,4 @@ #! /usr/bin/env node | ||
let gameWon = false | ||
const rounds = 6 | ||
const options = getOptions() | ||
const rounds = options.guesses || 6 | ||
const { wordOfTheDay, gameId } = word.get(options) | ||
@@ -14,0 +14,0 @@ const guessRegex = new RegExp(`^[a-z]{${wordOfTheDay.length}}$`, 'i') |
module.exports = { | ||
title() { | ||
console.clear() | ||
// console.clear() | ||
console.log(` | ||
@@ -77,2 +77,3 @@ | ||
-r --random : Play with a randomly selected word | ||
-g --guesses <number> : Set a custom amount of rounds for a game | ||
-s --spoiler : Show the word of the day immediately | ||
@@ -79,0 +80,0 @@ -u --unlimited : Disable the maximum of 6 rounds per game |
{ | ||
"name": "wordle-cli", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "CLI interpretation of the game Wordle", | ||
@@ -5,0 +5,0 @@ "main": "bin/index.js", |
@@ -29,2 +29,4 @@ # Wordle CLI | ||
`-g` `--guesses` `<number>`: Set a custom amount of rounds for a game | ||
`-s` `--spoiler`: Show the word of the day immediately | ||
@@ -31,0 +33,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
154166
13258
40