예제 #1
0
        public void RollCrewDice()
        {
            Crew.ForEach(c => c.Roll());
            // check if scanners have 3 threats and notify ThreatManager to draw a new threat

            while (Crew.Count(c => c.State == CrewState.Locked) >= ScannerSize)
            {
                for (int i = 0; i < ScannerSize; i++)
                {
                    Crew.First(c => c.State == CrewState.Locked).State = CrewState.Returning;
                }
                _eventManager.Trigger("ScannerDrawThreatCard");
            }
        }
예제 #2
0
        private async Task ReadMovieCast(int movieId)
        {
            string     query      = $"movie/{movieId}/casts?api_key={TmdbConstants.TmdbKey}";
            CastResult castResult = await RestClient.GetResults <CastResult>(query);

            FullCast = castResult.Actors;
            FullCrew = castResult.Crew;

            Cast        = FullCast.Where(c => !string.IsNullOrWhiteSpace(c.PictureUrl)).Take(10);
            HasMoreCast = Cast.Count() < FullCast.Count();

            Crew        = FullCrew.Where(c => !string.IsNullOrWhiteSpace(c.PictureUrl)).Take(10);
            HasMoreCrew = Crew.Count() < FullCrew.Count();
        }