コード例 #1
0
ファイル: Game.cs プロジェクト: nevillejrbrown/DyerGame
 public GameStats GetStats()
 {
     return(new GameStats
     {
         NumberInHat = Celebs.Count(c => c.State == CelebState.IN_HAT),
         NumberGuessed = Celebs.Count(c => c.State == CelebState.GUESSED),
         NumberBurned = Celebs.Count(c => c.State == CelebState.BURNED)
     });
 }
コード例 #2
0
ファイル: Game.cs プロジェクト: nevillejrbrown/DyerGame
 public IEnumerable <Celeb> getCelebsInHat()
 {
     return(Celebs.Where(c => c.State == CelebState.IN_HAT));
 }
コード例 #3
0
ファイル: Game.cs プロジェクト: nevillejrbrown/DyerGame
 public IEnumerable <Celeb> getGuessedCelebs()
 {
     return(Celebs.Where(c => c.State == CelebState.GUESSED));
 }
コード例 #4
0
ファイル: Game.cs プロジェクト: nevillejrbrown/DyerGame
 public Celeb GetCelebById(int id)
 {
     return(Celebs.Where(c => c.Id == id).Single());
 }