예제 #1
0
 public void LevelOut()
 {
     Blinds.DelayedSwichEnquenue(hud);
     Blinds.DelayedSwichEnquenue(menu);
     Blinds.DelayedSwichEnquenue(emmiter);
     Blinds.GoFadeOut();
     SaveUserProfile();
 }
예제 #2
0
        private void DealOneBlind(Queue <SheepCard> cards)
        {
            var newBlind  = cards.Dequeue();
            var blindList = Blinds.ToList();

            blindList.Add(newBlind);
            BlindCards = CardUtil.CardListToString(blindList);
        }
예제 #3
0
        private void ProcessBlinds(int roomId, Blinds blinds, HandHistory handHistory)
        {
            if (!roomsData.TryGetValue(roomId, out RoomData roomData))
            {
                throw new HandBuilderException(handHistory.HandId, $"RoomData has not been found for room #{roomId}.");
            }

            TournamentDescriptor tournament = null;

            var isSTT = roomData.GameType.Equals("STT", StringComparison.OrdinalIgnoreCase);
            var isMTT = !isSTT && roomData.GameType.Equals("MTT", StringComparison.OrdinalIgnoreCase);

            if (isSTT || isMTT)
            {
                tournament = new TournamentDescriptor
                {
                    Speed = TournamentSpeed.Regular
                };

                if (isSTT)
                {
                    ProcessSTT(tournament, blinds.RoomName, roomData);
                    tournament.StartDate = handHistory.DateOfHandUtc;
                }
                else
                {
                    ProcessMTT(tournament, blinds.RoomName);
                }
            }

            var tableType = roomData.TurnTime != 0 && roomData.TurnTime <= 15 ? TableTypeDescription.Speed : TableTypeDescription.Regular;

            if (roomData.IsAnonymousTable)
            {
                tableType = TableTypeDescription.Anonymous;
            }

            var limit = Limit.FromSmallBlindBigBlind(blinds.SmallBlind, blinds.BigBlind,
                                                     tournament != null ? Currency.Chips : (roomData.IsFreeroll ? Currency.PlayMoney : currency));

            handHistory.GameDescription = new GameDescriptor(
                tournament != null ? PokerFormat.Tournament : PokerFormat.CashGame,
                EnumPokerSites.Adda52,
                GetGameType(roomData),
                limit,
                TableType.FromTableTypeDescriptions(tableType),
                SeatType.FromMaxPlayers(roomData.MaxPlayers), tournament);

            handHistory.GameDescription.Identifier = roomId;
            handHistory.TableName = blinds.RoomName;

            if (tournament == null)
            {
                handHistory.GameDescription.CashBuyInHigh = roomData.BuyinHigh;
            }
        }
예제 #4
0
        public void GoSingleGame()
        {
            levelScore = 0;
            liveCount  = 3;

            profile = LoadUserProfile();
            float dificultFactor = profile.prevSessionScore / 1000;

            Debug.Log("defF = " + dificultFactor);
            CurrentLevel = System.Convert.ToSingle(System.Math.Round(dificultFactor, 2));

            Blinds.DelayedSwichEnquenue(hud);
            Blinds.DelayedSwichEnquenue(menu);
            Blinds.DelayedSwichEnquenue(emmiter);
            emmiter.Initialize(maxMaterial, dificultFactor, 70, 15);
            Blinds.GoFadeOut();
        }
예제 #5
0
        public StationViewModel()
        {
            light  = new Light();
            blinds = new Blinds();
            air    = new AirConditioner();

            Modules = new List <ITurnOnOffModule>();
            Modules.Add(light);
            Modules.Add(blinds);
            Modules.Add(air);


            term    = new Termomethre();
            humi    = new HumiditySensor();
            ligsens = new LightSensor();
            disp    = new Display();
        }