Exemplo n.º 1
0
 private void Main_Load(object sender, EventArgs e)
 {
     System.Net.ServicePointManager.DefaultConnectionLimit = 999999;
     if (!Directory.Exists(Program.config.TempPath))
     {
         Directory.CreateDirectory(Program.config.TempPath);
     }
     LoadConfig();
     if (Program.config.WebDownload)
     {
         new WebDownload().Listen();
     }
     new Thread(Upgraded).Start();
     if (Program.config.Access_Token == "null" || Program.config.Access_Token == string.Empty)
     {
         return;
     }
     try
     {
         SpaceInfo info = JsonConvert.DeserializeObject <SpaceInfo>(WebTool.GetHtml("https://pcs.baidu.com/rest/2.0/pcs/quota?method=info&access_token=" + Program.config.Access_Token));
         // Used_Lab.Text = string.Format("网盘已使用: {0} / {1} (GB)", (float)info.used / 1024 / 1024 / 1024, (float)info.quota / 1024 / 1024 / 1024);
         Text = string.Format("已登录账户 [{0}],已使用容量 {1} / {2} (GB)", DiskAPI.GetName(Program.config.Access_Token), (float)info.used / 1024 / 1024 / 1024, (float)info.quota / 1024 / 1024 / 1024);
     }
     catch (Exception ex)
     {
         LogTool.WriteLogError(typeof(Main), "更新容量信息时出现错误", ex);
         MessageBox.Show("更新容量信息时出现错误,请尝试重新登录");
         return;
     }
     DownloadListView.View = View.Details;
     new Thread(updateFileList).Start(HomePath + Path);
 }
Exemplo n.º 2
0
        internal void CreateSpaceList()
        {
            _gameContainer.SpaceList = new Dictionary <int, SpaceInfo>();
            int x;
            int y;
            int z = 0;

            for (x = 1; x <= 11; x++)
            {
                for (y = 1; y <= 2; y++)
                {
                    z += 1;
                    var thisSpace = new SpaceInfo();
                    if (z == 1)
                    {
                        thisSpace.IsEnabled = false;
                    }
                    else
                    {
                        thisSpace.IsEnabled = true;
                    }
                    _gameContainer.SpaceList.Add(z, thisSpace);
                }
            }
        }
Exemplo n.º 3
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (Program.config.Access_Token == "null" || Program.config.Access_Token == string.Empty)
     {
         MessageBox.Show("你还未登录呢");
         return;
     }
     if (Info_Lab.Text == "正在刷新")
     {
         return;
     }
     Info_Lab.Text = "正在刷新";
     try
     {
         SpaceInfo info = JsonConvert.DeserializeObject <SpaceInfo>(WebTool.GetHtml("https://pcs.baidu.com/rest/2.0/pcs/quota?method=info&access_token=" + Program.config.Access_Token));
         Used_Lab.Text = string.Format("网盘已使用: {0} / {1} (GB)", (float)info.used / 1024 / 1024 / 1024, (float)info.quota / 1024 / 1024 / 1024);
         Text          = string.Format("已登录账户 [{0}],已使用容量 {1} / {2} (GB)", DiskAPI.GetName(Program.config.Access_Token), (float)info.used / 1024 / 1024 / 1024, (float)info.quota / 1024 / 1024 / 1024);
     }
     catch (Exception ex)
     {
         LogTool.WriteLogError(typeof(Main), "更新容量信息时出现错误", ex);
         MessageBox.Show("更新容量信息时出现错误,请尝试重新登录");
         return;
     }
     new Thread(updateFileList).Start(HomePath + Path);
 }
Exemplo n.º 4
0
 void OnEnterSpace(string spaceID, Hashtable spaceAttrs)
 {
     this.space = new SpaceInfo(spaceID, spaceAttrs);
     if (this.player)
     {
         this.player.Space = this.space;
     }
     SceneManager.LoadScene("Level 01", LoadSceneMode.Single);
 }
Exemplo n.º 5
0
 internal static void CreateSpaceList(MancalaVMData data)
 {
     data.SpaceList = new Dictionary <int, SpaceInfo>();
     14.Times(x =>
     {
         SpaceInfo ThisSpace = new SpaceInfo();
         ThisSpace.Pieces    = 0;
         data.SpaceList.Add(x, ThisSpace); //has to be done this way.
     });
 }
Exemplo n.º 6
0
        private void Main_Load(object sender, EventArgs e)
        {
            System.Net.ServicePointManager.DefaultConnectionLimit = 99999;
            if (Program.config.Access_Token == "null" || Program.config.Access_Token == string.Empty)
            {
                return;
            }
            SpaceInfo info = JsonConvert.DeserializeObject <SpaceInfo>(WebTool.GetHtml("https://pcs.baidu.com/rest/2.0/pcs/quota?method=info&access_token=" + Program.config.Access_Token));

            Used_Lab.Text         = string.Format("网盘已使用: {0} / {1} (GB)", (float)info.used / 1024 / 1024 / 1024, (float)info.quota / 1024 / 1024 / 1024);
            DownloadListView.View = View.Details;
            new Thread(updateFileList).Start(HomePath + Path);
        }
        public static ServerMessage Compose(SpaceInfo Info)
        {
            ServerMessage message = new ServerMessage(FlagcodesOut.SPACES, ItemcodesOut.SPACES_ENTER_SCENE, false);

            message.AppendParameter(true, false);
            message.AppendParameter(true, false);
            message.AppendParameter(true, false);
            message.AppendParameter(false, false);
            message.AppendParameter(false, false);
            message.AppendParameter(Info.UInt32_0, false);
            message.AppendParameter((Info.ParentId <= 0) ? Info.UInt32_0 : Info.ParentId, false);
            message.AppendParameter(Info.Name, false);
            message.AppendParameter(true, false);
            return(message);
        }
Exemplo n.º 8
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (Program.config.Access_Token == "null" || Program.config.Access_Token == string.Empty)
            {
                MessageBox.Show("你还未登录呢");
                return;
            }
            if (Info_Lab.Text == "正在刷新...")
            {
                return;
            }
            Info_Lab.Text = "正在刷新...";
            SpaceInfo info = JsonConvert.DeserializeObject <SpaceInfo>(WebTool.GetHtml("https://pcs.baidu.com/rest/2.0/pcs/quota?method=info&access_token=" + Program.config.Access_Token));

            Used_Lab.Text = string.Format("网盘已使用: {0} / {1} (GB)", (float)info.used / 1024 / 1024 / 1024, (float)info.quota / 1024 / 1024 / 1024);
            new Thread(updateFileList).Start(HomePath + Path);
        }
Exemplo n.º 9
0
        private void PopulateSpaces() //done.
        {
            if (_spaceList != null)
            {
                return;
            }
            _spaceList = new Dictionary <int, SpaceInfo>();
            int       x;
            int       y;
            int       q = 0;
            int       z = 1;
            SpaceInfo thisSpace;

            for (x = 1; x <= 4; x++)
            {
                for (y = 1; y <= 4; y++)
                {
                    q                    += 1;
                    thisSpace             = new SpaceInfo();
                    thisSpace.ColorOwner  = (EnumColorChoice)z;
                    thisSpace.Index       = q;
                    thisSpace.WhatBoard   = EnumBoardStatus.IsStart;
                    thisSpace.SpaceNumber = y;
                    _spaceList.Add(q, thisSpace);
                }
                z += 1;
                if (z > 4)
                {
                    z = 1;
                }
            }
            y = 0;
            for (x = 17; x <= 44; x++)
            {
                y              += 1;
                thisSpace       = new SpaceInfo();
                thisSpace.Index = x;
                if (x == 17)
                {
                    thisSpace.ColorOwner = EnumColorChoice.Green;
                }
                else if (x == 24)
                {
                    thisSpace.ColorOwner = EnumColorChoice.Red;
                }
                else if (x == 31)
                {
                    thisSpace.ColorOwner = EnumColorChoice.Yellow;
                }
                else if (x == 38)
                {
                    thisSpace.ColorOwner = EnumColorChoice.Blue;
                }
                else
                {
                    thisSpace.ColorOwner = EnumColorChoice.None;
                }
                thisSpace.WhatBoard   = EnumBoardStatus.OnBoard;
                thisSpace.SpaceNumber = y;
                _spaceList.Add(x, thisSpace);
            }
            q = 44;
            z = 2;
            for (x = 1; x <= 4; x++)
            {
                for (y = 1; y <= 4; y++)
                {
                    q                    += 1;
                    thisSpace             = new SpaceInfo();
                    thisSpace.ColorOwner  = (EnumColorChoice)z;
                    thisSpace.SpaceNumber = y;
                    thisSpace.Index       = q;
                    thisSpace.WhatBoard   = EnumBoardStatus.IsHome;
                    _spaceList.Add(q, thisSpace);
                }
                z += 1;
                if (z > 4)
                {
                    z = 1;
                }
            }
        }
Exemplo n.º 10
0
 protected override void CreateSpaces()
 {
     14.Times(x =>
     {
         SpaceInfo thisSpace = _dataModel.SpaceList ![x];
         if (x == 1)
         {
             thisSpace.Bounds = GetActualRectangle(40, 40, 33, 33);
         }
         else if (x == 2)
         {
             thisSpace.Bounds = GetActualRectangle(40, 79, 33, 33);
         }
         else if (x == 3)
         {
             thisSpace.Bounds = GetActualRectangle(40, 118, 33, 33);
         }
         else if (x == 4)
         {
             thisSpace.Bounds = GetActualRectangle(40, 157, 33, 33);
         }
         else if (x == 5)
         {
             thisSpace.Bounds = GetActualRectangle(40, 196, 33, 33);
         }
         else if (x == 6)
         {
             thisSpace.Bounds = GetActualRectangle(40, 235, 33, 33);
         }
         else if (x == 7)
         {
             thisSpace.Bounds = GetActualRectangle(1, 274, 73, 33);
         }
         else if (x == 8)
         {
             thisSpace.Bounds = GetActualRectangle(1, 235, 33, 33);
         }
         else if (x == 9)
         {
             thisSpace.Bounds = GetActualRectangle(1, 196, 33, 33);
         }
         else if (x == 10)
         {
             thisSpace.Bounds = GetActualRectangle(1, 157, 33, 33);
         }
         else if (x == 11)
         {
             thisSpace.Bounds = GetActualRectangle(1, 118, 33, 33);
         }
         else if (x == 12)
         {
             thisSpace.Bounds = GetActualRectangle(1, 79, 33, 33);
         }
         else if (x == 13)
         {
             thisSpace.Bounds = GetActualRectangle(1, 40, 33, 33);
         }
         else if (x == 14)
         {
             thisSpace.Bounds = GetActualRectangle(1, 1, 73, 33);
         }
     });
        public static ServerMessage Message(List <NavigatorItem> ItemContainer, SpaceInfo InfoContainer, uint Category)
        {
            ServerMessage message = new ServerMessage(FlagcodesOut.NAVIGATOR, ItemcodesOut.NAVIGATOR_ITEMS, false);

            switch (Category)
            {
            case 1:
                message.AppendParameter(1, false);
                foreach (NavigatorItem item in ItemContainer)
                {
                    uint num = 0;
                    if (item.ParentId.Equals((uint)0) && (item.Category == NavigatorCategory.Area))
                    {
                        foreach (SpaceInstance instance in SpaceManager.SpaceInstances.Values)
                        {
                            if (instance.Info.ParentId == item.UInt32_0)
                            {
                                num += (uint)instance.HumanActorCount;
                            }
                        }
                        message.AppendParameter(1, true);
                        message.AppendParameter(1, true);
                        message.AppendParameter(item.SpaceId, true);
                        message.AppendParameter(item.Name, true);
                        message.AppendParameter(num, true);
                        message.AppendParameter(false, true);
                        message.AppendParameter(false, true);
                        message.AppendParameter(false, true);
                        message.AppendParameter("-1", true);
                        message.AppendParameter(false, false);
                    }
                }
                return(message);

            case 2:
                message.AppendParameter(2, false);
                foreach (NavigatorItem item2 in ItemContainer)
                {
                    SpaceInstance instance2 = item2.TryGetSpaceInstance();
                    message.AppendParameter(0, true);
                    message.AppendParameter(0, true);
                    message.AppendParameter(0, true);
                    message.AppendParameter(item2.Name, true);
                    if (instance2 == null)
                    {
                        message.AppendParameter(0, true);
                    }
                    else
                    {
                        message.AppendParameter(instance2.ActorCount, true);
                    }
                    message.AppendParameter(item2.UInt32_0, true);
                    message.AppendParameter(0, true);
                    message.AppendParameter(0, true);
                    message.AppendParameter(0, true);
                    message.AppendParameter(0, false);
                }
                return(message);

            case 3:
                message.AppendParameter(3, false);
                foreach (NavigatorItem item3 in ItemContainer)
                {
                    SpaceInstance instance3 = item3.TryGetSpaceInstance();
                    if (item3.ParentId.Equals((uint)0) && (item3.Category == NavigatorCategory.Game))
                    {
                        message.AppendParameter(1, true);
                        message.AppendParameter(true, true);
                        message.AppendParameter(item3.SpaceId, true);
                        message.AppendParameter(item3.Name, true);
                        if (instance3 == null)
                        {
                            message.AppendParameter(0, true);
                        }
                        else
                        {
                            message.AppendParameter(instance3.ActorCount, true);
                        }
                        message.AppendParameter(false, true);
                        message.AppendParameter(false, true);
                        message.AppendParameter(false, true);
                        message.AppendParameter("-1", true);
                        message.AppendParameter(false, false);
                    }
                }
                return(message);

            case 4:
                message.AppendParameter(4, false);
                return(message);
            }
            return(message);
        }
Exemplo n.º 12
0
        internal static void PopulateSpaces(LifeBoardGameGameContainer gameContainer)
        {
            SpaceInfo space;

            for (var x = 1; x <= 147; x++)
            {
                space = new SpaceInfo();
                switch (x)
                {
                case 1:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = 20000;
                    space.Description    = "Scholarship!";
                    break;
                }

                case 2:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -5000;
                    space.Description    = "Buy books and supplies.";
                    break;
                }

                case 3:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Make new friends.";
                    break;
                }

                case 4:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = 5000;
                    space.Description    = "Part time job.";
                    break;
                }

                case 5:
                {
                    space.ActionInfo  = EnumActionType.WillMissTurn;
                    space.Description = "Study for exams.";
                    break;
                }

                case 6:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Study abroad.";
                    break;
                }

                case 7:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -5000;
                    space.Description    = "Spring Break!";
                    break;
                }

                case 8:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Dean's List!";
                    break;
                }

                case 9:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -5000;
                    space.Description    = "Your buddies crash your car.";
                    space.WhatInsurance  = EnumInsuranceType.NeedCar;
                    break;
                }

                case 10:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Graduation day!";
                    break;
                }

                case 11:
                {
                    space.ActionInfo  = EnumActionType.StartCareer;
                    space.Description = "CAREER CHOICE!";
                    break;
                }

                case 12:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 13:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -5000;
                    space.Description    = "Rent apartment.";
                    break;
                }

                case 14:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = 10000;
                    space.Description    = "Inheritance.";
                    break;
                }

                case 15:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 16:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Adopt a pet.";
                    break;
                }

                case 17:
                {
                    space.ActionInfo  = EnumActionType.WillMissTurn;
                    space.Description = "Lost!";
                    break;
                }

                case 18:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Birthday Party!";
                    break;
                }

                case 19:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.CareerSpace    = EnumCareerType.Doctor;
                    space.AmountReceived = -5000;
                    space.Description    = "Ski accident";
                    break;
                }

                case 20:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = 10000;
                    space.Description    = "Win marathan";
                    break;
                }

                case 21:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Visit a muesum.";
                    break;
                }

                case 22:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Cycle to work.";
                    break;
                }

                case 23:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 24:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -15000;
                    space.Description    = "Car rolls away.";
                    space.WhatInsurance  = EnumInsuranceType.NeedCar;
                    break;
                }

                case 25:
                {
                    space.ActionInfo = EnumActionType.GetMarried;
                    break;
                }

                case 26:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -10000;
                    space.Description    = "Wedding reception.";
                    break;
                }

                case 27:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Happy honeymoon!";
                    break;
                }

                case 28:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -10000;
                    space.CareerSpace    = EnumCareerType.SalesPerson;
                    space.Description    = "Upgrade computer.";
                    break;
                }

                case 29:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -10000;
                    space.Description    = "Car accident";
                    space.WhatInsurance  = EnumInsuranceType.NeedCar;
                    break;
                }

                case 30:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -10000;
                    space.Description    = "Attend high-tech seminar.";
                    space.CareerSpace    = EnumCareerType.ComputerConsultant;
                    break;
                }

                case 31:
                {
                    space.ActionInfo = EnumActionType.AttendNightSchool;
                    break;
                }

                case 32:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 33:
                {
                    space.ActionInfo = EnumActionType.PayTaxes;
                    break;
                }

                case 34:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = 50000;
                    space.Description    = "Win lottery!";
                    break;
                }

                case 35:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Visit in-laws.";
                    break;
                }

                case 36:
                {
                    space.ActionInfo = EnumActionType.MayBuyHouse;
                    break;
                }

                case 37:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 38:
                {
                    space.ActionInfo  = EnumActionType.FindNewJob;
                    space.Description = "Lose your job." + Constants.vbCrLf + "Start new career.";
                    break;
                }

                case 39:
                {
                    space.ActionInfo = EnumActionType.GotBabyBoy;
                    break;
                }

                case 40:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -5000;
                    space.Description    = "Furnish baby room.";
                    space.CareerSpace    = EnumCareerType.SalesPerson;
                    break;
                }

                case 41:
                {
                    space.ActionInfo = EnumActionType.GotBabyGirl;
                    break;
                }

                case 42:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = 10000;
                    space.Description    = "Win talent show.";
                    break;
                }

                case 43:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 44:
                {
                    space.ActionInfo  = EnumActionType.HadTwins;
                    space.Description = "Twins!";
                    break;
                }

                case 45:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -20000;
                    space.Description    = "50-yard line seats at the big game.";
                    space.CareerSpace    = EnumCareerType.Athlete;
                    break;
                }

                case 46:
                {
                    space.ActionInfo = EnumActionType.GotBabyGirl;
                    break;
                }

                case 47:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -5000;
                    space.Description    = "Attend Hollywood movie premier.";
                    space.CareerSpace    = EnumCareerType.Entertainer;
                    break;
                }

                case 48:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -40000;
                    space.Description    = "House flooded!";
                    space.WhatInsurance  = EnumInsuranceType.NeedHouse;
                    break;
                }

                case 49:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -5000;
                    space.Description    = "Family physicals.";
                    space.CareerSpace    = EnumCareerType.Doctor;
                    break;
                }

                case 50:
                {
                    space.ActionInfo = EnumActionType.TradeSalary;
                    break;
                }

                case 51:
                {
                    space.ActionInfo = EnumActionType.GotBabyBoy;
                    break;
                }

                case 52:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 53:
                {
                    space.ActionInfo = EnumActionType.GotBabyGirl;
                    break;
                }

                case 54:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -1500;
                    space.Description    = "Tree falls on house.";
                    space.WhatInsurance  = EnumInsuranceType.NeedHouse;
                    break;
                }

                case 55:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Return lost wallet.";
                    break;
                }

                case 56:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -5000;
                    space.Description    = "Buy high-definition TV.";
                    space.CareerSpace    = EnumCareerType.SalesPerson;
                    break;
                }

                case 57:
                {
                    space.ActionInfo = EnumActionType.StockBoomed;
                    break;
                }

                case 58:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Family picnic.";
                    break;
                }

                case 59:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Visit Mount Rushmore.";
                    break;
                }

                case 60:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 61:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -15000;
                    space.Description    = "Car stolen!";
                    space.WhatInsurance  = EnumInsuranceType.NeedCar;
                    break;
                }

                case 62:
                {
                    space.ActionInfo = EnumActionType.TradeSalary;
                    break;
                }

                case 63:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Run for mayor.";
                    break;
                }

                case 64:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Vote!";
                    break;
                }

                case 65:
                {
                    space.ActionInfo = EnumActionType.GotBabyBoy;
                    break;
                }

                case 66:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 67:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -25000;
                    space.Description    = "Buy luxury cruise online.";
                    space.CareerSpace    = EnumCareerType.ComputerConsultant;
                    break;
                }

                case 68:
                {
                    space.ActionInfo = EnumActionType.AttendNightSchool;
                    break;
                }

                case 69:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Learn CPR.";
                    break;
                }

                case 70:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -20000;
                    space.Description    = "Art auction.";
                    space.CareerSpace    = EnumCareerType.Artist;
                    break;
                }

                case 71:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 72:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Volunteer at charity sports event.";
                    break;
                }

                case 73:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = 10000;
                    space.Description    = "Win photography contest.";
                    break;
                }

                case 74:
                {
                    space.ActionInfo = EnumActionType.SpinAgainIfBehind;
                    break;
                }

                case 75:
                {
                    space.ActionInfo = EnumActionType.TradeSalary;
                    break;
                }

                case 76:
                {
                    space.ActionInfo = EnumActionType.PayTaxes;
                    break;
                }

                case 77:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -25000;
                    space.Description    = "Tennis camp.";
                    space.CareerSpace    = EnumCareerType.Athlete;
                    break;
                }

                case 78:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -25000;
                    space.Description    = "Donate computer network.";
                    space.CareerSpace    = EnumCareerType.ComputerConsultant;
                    break;
                }

                case 79:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 80:
                {
                    space.ActionInfo = EnumActionType.StockCrashed;
                    break;
                }

                case 81:
                {
                    space.ActionInfo = EnumActionType.MaySellHouse;
                    break;
                }

                case 82:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.PerKid         = true;
                    space.AmountReceived = -5000;
                    space.Description    = "Day care.";
                    space.CareerSpace    = EnumCareerType.Teacher;
                    break;
                }

                case 83:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = 80000;
                    space.Description    = "Write best-seller.";
                    break;
                }

                case 84:
                {
                    space.ActionInfo  = EnumActionType.HadTwins;
                    space.Description = "Adopt twins!";
                    break;
                }

                case 85:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -15000;
                    space.Description    = "Invest in broadway play.";
                    space.CareerSpace    = EnumCareerType.Entertainer;
                    break;
                }

                case 86:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 87:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Join health club.";
                    break;
                }

                case 88:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -35000;
                    space.Description    = "Family portrait.";
                    space.CareerSpace    = EnumCareerType.Artist;
                    break;
                }

                case 89:
                {
                    space.ActionInfo = EnumActionType.TradeSalary;
                    break;
                }

                case 90:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -25000;
                    space.Description    = "Buy sport utility vehicle.";
                    space.CareerSpace    = EnumCareerType.SalesPerson;
                    break;
                }

                case 91:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = 75000;
                    space.Description    = "Tax refund.";
                    break;
                }

                case 92:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -15000;
                    space.Description    = "Host Police Charity Ball!";
                    space.CareerSpace    = EnumCareerType.PoliceOfficer;
                    break;
                }

                case 93:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 94:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = 80000;
                    space.Description    = "Find buried treasure!";
                    break;
                }

                case 95:
                {
                    space.ActionInfo = EnumActionType.PayTaxes;
                    break;
                }

                case 96:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 97:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.CareerSpace    = EnumCareerType.Artist;
                    space.AmountReceived = -25000;
                    space.Description    = "Donate to Art Institute.";
                    break;
                }

                case 98:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Recycle.";
                    break;
                }

                case 99:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = 95000;
                    space.Description    = "TV Game show winner!";
                    break;
                }

                case 100:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -5000;
                    space.Description    = "Summer School.";
                    space.PerKid         = true;
                    space.CareerSpace    = EnumCareerType.Teacher;
                    break;
                }

                case 101:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Have a Family Game Night.";
                    break;
                }

                case 102:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Learn sign language.";
                    break;
                }

                case 103:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -90000;
                    space.Description    = "Buy lakeside cabin.";
                    break;
                }

                case 104:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 105:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -50000;
                    space.Description    = "Burglar!";
                    space.WhatInsurance  = EnumInsuranceType.NeedHouse;
                    break;
                }

                case 106:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = 10000;
                    space.Description    = "Win Nobel Peace Prize.";
                    break;
                }

                case 107:
                {
                    space.ActionInfo = EnumActionType.TradeSalary;
                    break;
                }

                case 108:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -30000;
                    space.Description    = "Buy home gym.";
                    space.CareerSpace    = EnumCareerType.Athlete;
                    break;
                }

                case 109:
                {
                    space.ActionInfo = EnumActionType.StockCrashed;
                    break;
                }

                case 110:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -125000;
                    space.Description    = "Tornado hits house!";
                    space.WhatInsurance  = EnumInsuranceType.NeedHouse;
                    break;
                }

                case 111:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 112:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -25000;
                    space.Description    = "Life-saving operation.";
                    space.CareerSpace    = EnumCareerType.Doctor;
                    break;
                }

                case 113:
                {
                    space.ActionInfo = EnumActionType.PayTaxes;
                    break;
                }

                case 114:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -30000;
                    space.Description    = "Buy sailboat.";
                    space.CareerSpace    = EnumCareerType.SalesPerson;
                    break;
                }

                case 115:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -35000;
                    space.Description    = "Sponsor golf tournament.";
                    space.CareerSpace    = EnumCareerType.Athlete;
                    break;
                }

                case 116:
                {
                    space.ActionInfo  = EnumActionType.FindNewJob;
                    space.Description = "Mid-life crisis." + Constants.vbCrLf + "Start new career.";
                    break;
                }

                case 117:
                {
                    space.ActionInfo = EnumActionType.SpinAgainIfBehind;
                    break;
                }

                case 118:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 119:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -100000;
                    space.CareerSpace    = EnumCareerType.Entertainer;
                    space.Description    = "Host on-line concert.";
                    break;
                }

                case 120:
                {
                    space.ActionInfo = EnumActionType.TradeSalary;
                    break;
                }

                case 121:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Help the homeless.";
                    break;
                }

                case 122:
                {
                    space.ActionInfo = EnumActionType.SpinAgainIfBehind;
                    break;
                }

                case 123:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -100000;
                    space.Description    = "Have cosmetic surgery.";
                    space.CareerSpace    = EnumCareerType.Doctor;
                    break;
                }

                case 124:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -50000;
                    space.Description    = "College.";
                    space.CareerSpace    = EnumCareerType.Teacher;
                    break;
                }

                case 125:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 126:
                {
                    space.ActionInfo = EnumActionType.PayTaxes;
                    break;
                }

                case 127:
                {
                    space.ActionInfo = EnumActionType.SpinAgainIfBehind;
                    break;
                }

                case 128:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Visit memorial.";
                    break;
                }

                case 129:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -125000;
                    space.CareerSpace    = EnumCareerType.Artist;
                    space.Description    = "Sponsor art exhihit.";
                    break;
                }

                case 130:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Grand Canyon vacation.";
                    break;
                }

                case 131:
                {
                    space.ActionInfo = EnumActionType.TradeSalary;
                    break;
                }

                case 132:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 133:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Go fishing.";
                    break;
                }

                case 134:
                {
                    space.ActionInfo = EnumActionType.SpinAgainIfBehind;
                    break;
                }

                case 135:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -65000;
                    space.Description    = "Hire jockey for your racehorse.";
                    space.CareerSpace    = EnumCareerType.Athlete;
                    break;
                }

                case 136:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Go hiking.";
                    break;
                }

                case 137:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 138:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Plant a tree.";
                    break;
                }

                case 139:
                {
                    space.ActionInfo = EnumActionType.SpinAgainIfBehind;
                    break;
                }

                case 140:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "Support wildlife fund.";
                    break;
                }

                case 141:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -45000;
                    space.CareerSpace    = EnumCareerType.ComputerConsultant;
                    space.Description    = "Have a web site designed.";
                    break;
                }

                case 142:
                {
                    space.ActionInfo  = EnumActionType.ObtainLifeTile;
                    space.Description = "You're a grandparent!";
                    break;
                }

                case 143:
                {
                    space.ActionInfo = EnumActionType.GetPaid;
                    break;
                }

                case 144:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -35000;
                    space.Description    = "Throw party for entertainment award winners.";
                    space.CareerSpace    = EnumCareerType.Entertainer;
                    break;
                }

                case 145:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = -45000;
                    space.Description    = "Invest in E-commerce company.";
                    space.CareerSpace    = EnumCareerType.ComputerConsultant;
                    break;
                }

                case 146:
                {
                    space.ActionInfo     = EnumActionType.CollectPayMoney;
                    space.AmountReceived = 20000;
                    space.Description    = "Pension";
                    break;
                }

                case 147:
                {
                    space.ActionInfo = EnumActionType.WillRetire;
                    break;
                }
                }
                if (space.ActionInfo == EnumActionType.ObtainLifeTile)
                {
                    space.GetLifeTile = true;
                }
                if (space.ActionInfo == EnumActionType.GotBabyBoy)
                {
                    space.GetLifeTile = true;
                }
                if (space.ActionInfo == EnumActionType.GotBabyGirl)
                {
                    space.GetLifeTile = true;
                }
                if (space.ActionInfo == EnumActionType.HadTwins)
                {
                    space.GetLifeTile = true;
                }
                if (space.ActionInfo == EnumActionType.GetMarried)
                {
                    space.GetLifeTile = true;
                }
                if (space.ActionInfo == EnumActionType.TradeSalary)
                {
                    space.IsOptional = true;
                }
                if (space.ActionInfo == EnumActionType.MayBuyHouse)
                {
                    space.IsOptional = true;
                }
                if (space.ActionInfo == EnumActionType.MaySellHouse)
                {
                    space.IsOptional = true;
                }
                if (space.ActionInfo == EnumActionType.AttendNightSchool)
                {
                    space.IsOptional     = true;
                    space.AmountReceived = -20000;
                    space.CareerSpace    = EnumCareerType.Teacher;
                }
                if (space.ActionInfo == EnumActionType.PayTaxes)
                {
                    space.CareerSpace = EnumCareerType.Accountant;
                }
                gameContainer.SpaceList.Add(space);
            }
        }
Exemplo n.º 13
0
        public GameBoardProcesses(IAsyncDelayer delay,
                                  EventAggregator aggregator,
                                  BasicData basicData,
                                  TestOptions test,
                                  SnakesAndLaddersVMData model
                                  )
        {
            //_mainGame = mainGame;
            _delay      = delay;
            _aggregator = aggregator;
            _basicData  = basicData;
            _test       = test;
            _model      = model;
            _spaceList  = new Dictionary <int, SpaceInfo>();
            int x;

            for (x = 1; x <= 100; x++)
            {
                SpaceInfo thisSpace = new SpaceInfo();
                thisSpace.JumpTo = x;
                if (x == 4)
                {
                    thisSpace.JumpTo = 39;
                }
                else if (x == 30)
                {
                    thisSpace.JumpTo = 12;
                }
                else if (x == 33)
                {
                    thisSpace.JumpTo = 52;
                }
                else if (x == 36)
                {
                    thisSpace.JumpTo = 8;
                }
                else if (x == 59)
                {
                    thisSpace.JumpTo = 63;
                }
                else if (x == 70)
                {
                    thisSpace.JumpTo = 50;
                }
                else if (x == 26)
                {
                    thisSpace.JumpTo = 75;
                }
                else if (x == 73)
                {
                    thisSpace.JumpTo = 93;
                }
                else if (x == 86)
                {
                    thisSpace.JumpTo = 57;
                }
                else if (thisSpace.JumpTo == 99)
                {
                    thisSpace.JumpTo = 42;
                }
                _spaceList.Add(x, thisSpace);
            }
        }