Peeveli Docs
Fall 2025
API

# o1.peeveli

package o1.peeveli

## Members list

### Packages

package o1.peeveli.gui

### Type members

#### Classlikes

class GameState(val `missesAllowed`: Int, val `previousGuesses`: String, val `visibleWord`: String, val `viableSolutions`: Vector[String])

Each instance of class `GameState` represents a single state within the Peeveli variant of Hangman: What does the (partially visible) target word look like to the guesser? How many incorrect guesses can the guesser still make? Which guesses have already been made? Moreover, our dishonest hangman needs an additional piece of information: Which words are still credible solutions given the earlier guesses?

Each instance of class `GameState` represents a single state within the Peeveli variant of Hangman: What does the (partially visible) target word look like to the guesser? How many incorrect guesses can the guesser still make? Which guesses have already been made? Moreover, our dishonest hangman needs an additional piece of information: Which words are still credible solutions given the earlier guesses?

Chapter 10.2 of the ebook details the Peeveli game’s internal logic.

While a player plays a game of Peeveli, the game will move from one state to another. Even so, each `GameState` object is immutable. Each successive state is represented by a new `GameState` object, which is generated by calling the current state’s `guessLetter` method.

## Parameters

missesAllowed

  the number of incorrect guesses that the guesser can still make before losing the game. A negative number means that the game is over.

previousGuesses

  a string that contains all the previously guessed characters in order

viableSolutions

  all the words in the game’s vocabulary that match the `visibleWord` parameter and are therefore plausible correct solutions

visibleWord

  the version of the target word that is visible to the guesser. In a state that represents the beginning of the game, this will consist of unrevealed characters only (e.g., `"_____"`); see Unrevealed. In later states, more and more characters will be visible (e.g., `"C___O"`).

## Attributes

Supertypes
  class Object
  trait Matchable
  class Any

### Value members

#### Concrete fields

val Unrevealed: Char

the character that Peeveli uses to signify unrevealed letters

the character that Peeveli uses to signify unrevealed letters

## Attributes