Viinaharava Docs
Fall 2026
API

# o1.viinaharava

package o1.viinaharava

## Members list

### Packages

package o1.viinaharava.gui

### Type members

#### Classlikes

class GameBoard(`width`: Int, `height`: Int, `boozeCount`: Int) extends Grid[Glass]

Each instance of the class `GameBoard` represents a board for a game of Viinaharava. A game board is a `Grid` whose elements are `Glass` objects.

Each instance of the class `GameBoard` represents a board for a game of Viinaharava. A game board is a `Grid` whose elements are `Glass` objects.

A `GameBoard` is first initialized with water glasses (by initialElements). However, a number of the glasses are then immediately poured full of booze while the rest keep their default content of water.

Once created, a `GameBoard` does not replace any of its `Glass` objects with another. However, the state of each individual `Glass` may change.

## Parameters

boozeCount

  the number of booze glasses on the game board. When a `GameBoard` object is created, it randomly chooses this many different locations on the board and pours booze in them.

height

  the number of rows of glasses in the game board

width

  the number of glasses in each row of the game board

## Attributes

Supertypes
  trait Grid[Glass]
  class Object
  trait Matchable
  class Any

class Glass(val `board`: GameBoard, val `location`: GridPos)

The class `Glass` represents glasses in a game of Viinaharava. A glass object is mutable: it is initially full of water but can be modified to contain booze instead and can be emptied.

The class `Glass` represents glasses in a game of Viinaharava. A glass object is mutable: it is initially full of water but can be modified to contain booze instead and can be emptied.

## Parameters

board

  the game board that the glass is located on

location

  the location of the glass on the game board

## Attributes

Supertypes
  class Object
  trait Matchable
  class Any