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

BasicGameConditions

Extends:

GameConditions → BasicGameConditions

Game win and loss conditions for a kill-all-enemies game

Method Summary

Public Methods
public

Tells if the player has won by eliminating all enemies in the dungeon

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 eliminating all enemies in the dungeon

Override:

GameConditions#hasPlayerWon

Params:

NameTypeAttributeDescription
dungeon Dungeon

The dungeon being played

Return:

Boolean

true if the player is the only creature left; false otherwise