public GameState DetermineDungeonPhase() {// this method checks the status of the dungeon and returns a game state enum to determine which phase we should be in // first check if there are any monsters if (DungeonDice.Any(d => d.IsMonster)) { // we have a monster we should be in omnster phase return(GameState.MonsterPhase); } // no monsters, let's check if there is loot if (HasLoot) { // we found loot, should be in loot phase return(GameState.LootPhase); } // lets check if we should go to dragon phase if (DragonsLair > 2) { // there are 3 or more dragons in the lair, we should fight the dragon return(GameState.DragonPhase); } // TODO: Consider checking if level 10 is cleared to mark the end of a delve and award points // if we are here, dungeon level is clear and we should be in the regroup phase return(GameState.RegroupPhase); }
public bool IsMonsterInDungeon(DungeonDieType monster) { // checks if the monster is present in the dungeon return(DungeonDice.Any(d => d.DungeonDieType == monster && d.IsMonster)); }
public bool IsMonsterInDungeon(string monsterName) { // checks if the monster is present in the dungeon return(DungeonDice.Any(d => d.Name == monsterName && d.IsMonster)); }