Reference Source
public class | source

Category

A category of clues on the board.

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public get

Method Summary

Public Methods
public

Retrieve next unanswered clue in the category, increment cluesAnswered.

public

reset()

Reset clues answered count to 0.

Public Constructors

public constructor(name: string) source

Params:

NameTypeAttributeDescription
name string

name of the category.

Public Members

public clues: Object[] source

public cluesAnswered: number source

public get complete: boolean source

Public Methods

public nextClue(): Clue source

Retrieve next unanswered clue in the category, increment cluesAnswered. If all clues are answered, this will return undefined.

Return:

Clue

the next unanswered clue.

Throw:

Error

throw error when category is complete.

public reset() source

Reset clues answered count to 0.