Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wordle-cli

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wordle-cli - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

16

bin/index.js

@@ -8,4 +8,4 @@ #! /usr/bin/env node

// Define variables
let currentRound = 0
let gameWon = false
let history = []
const options = getOptions()

@@ -35,4 +35,2 @@ const rounds = options.guesses || 6

return
} else if (!options.unlimited) {
currentRound++
}

@@ -87,4 +85,6 @@

history.push(result)
// Start new round or end game
if (currentRound < rounds && !gameWon) {
if ((options.unlimited || history.length < rounds) && !gameWon) {
round()

@@ -100,3 +100,3 @@ } else {

if (gameWon) {
messages.youWon(gameId, { unlimited: options.unlimited, currentRound, rounds })
messages.youWon(gameId, { unlimited: options.unlimited, roundsPlayed: history.length, rounds })
} else {

@@ -116,2 +116,8 @@ console.log('Game over! The word was ' + wordOfTheDay.join(''))

process.exit(0)
} else if (options.guesses && options.unlimited) {
console.log("You can't choose an amount of guesses in combination with the unlimited flag")
process.exit(0)
} else if (options.word && options.random) {
console.log("You can't choose a custom word in combination with the random flag")
process.exit(0)
} else if (options.spoiler) {

@@ -118,0 +124,0 @@ await word.show(

@@ -24,3 +24,3 @@ const { insertSpaces } = require('./utils')

if (gameId) stats.push(`#${gameId}`)
if (!rounds.unlimited) stats.push(`${rounds.currentRound}/${rounds.rounds}`)
if (!rounds.unlimited) stats.push(`${rounds.roundsPlayed}/${rounds.rounds}`)

@@ -27,0 +27,0 @@ if (stats.length) statsOutput = `wordle ${stats.join(' ')}`

{
"name": "wordle-cli",
"version": "1.2.1",
"version": "1.2.2",
"description": "CLI interpretation of the game Wordle",

@@ -5,0 +5,0 @@ "main": "bin/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc