Home Reference Source Repository
import GetTheTreasureConditions from 'roguelike/app/conditions/GetTheTreasureConditions.js'
public class | source

GetTheTreasureConditions

Extends:

GameConditions → GetTheTreasureConditions

Victory and defeat conditions for a steal-the-treasure game

Method Summary

Public Methods
public

Tells if the player has won by stealing the treasure

Inherited Summary

From class GameConditions
public

Tells if the player has lost the game

public

Tells if the player has won the game

Public Methods

public hasPlayerWon(dungeon: Dungeon): Boolean source

Tells if the player has won by stealing the treasure

Override:

GameConditions#hasPlayerWon

Params:

NameTypeAttributeDescription
dungeon Dungeon

The dungeon being played

Return:

Boolean

true if the player has the treasure in their position and is standing at the entrance; false otherwise