public SmithChart(ChartView BaseChart) { smith = new Smith(); var = new Variables.Variables(); smith.GetHorizAxis = BaseChart.Chart.Axes.Bottom; smith.GetVertAxis = BaseChart.Chart.Axes.Left; BaseChart.Chart.Title.Text = "Smith series"; BaseChart.Chart.Axes.Left.Visible = true; BaseChart.Chart.Axes.Bottom.Visible = true; BaseChart.Chart.Axes.Left.Labels.Visible = true; BaseChart.Chart.Axes.Bottom.Labels.Visible = true; BaseChart.Chart.Axes.Left.Automatic = true; BaseChart.Chart.Axes.Bottom.Automatic = true; BaseChart.Chart.Axes.Left.Increment = 0.5; BaseChart.Chart.Axes.Left.Grid.Visible = true; smith.GetHorizAxis = BaseChart.Chart.Axes.Bottom; smith.GetVertAxis = BaseChart.Chart.Axes.Left; smith.FillSampleValues(); smith.Circled = true; smith.Pointer.Visible = true; smith.Pointer.Color = var.GetPaletteBasic[0]; smith.Color = var.GetPaletteBasic[0]; smith.RLabels = true; smith.CLabels = true; smith.CLabelsFont.Size = 11; smith.RLabelsFont.Size = 11; BaseChart.Chart.Series.Add(smith); }
public void ConfirmSelection() { people[selectedPerson].Spawn(); switch (Random.Range(0, 4)) { case 0: people[selectedPerson] = new Warrior("Jon"); break; case 1: people[selectedPerson] = new Cook("Jon"); break; case 2: people[selectedPerson] = new Smith("Jon"); break; case 3: people[selectedPerson] = new Carpenter("Jon"); break; } choices[selectedPerson].transform.GetChild(0).GetChild(0).GetComponent <TextMeshProUGUI>().text = people[selectedPerson].personName; choices[selectedPerson].transform.GetChild(0).GetChild(1).GetComponent <TextMeshProUGUI>().text = people[selectedPerson].GetType().ToString(); choices[selectedPerson].transform.GetChild(2).GetComponent <TextMeshProUGUI>().text = people[selectedPerson].originalStats.ToString(); choices[selectedPerson].GetComponent <Image>().color = new Color(1, 1, 1, 100f / 255f); gameObject.SetActive(false); }
private static void ProcessTown() { var kadalaItem = Kadala.GetSelectedItem(); if (kadalaItem != Kadala.Items.NONE && OpenWindows.IsKadalaNewOpened()) { Kadala.GambleItem(kadalaItem); } if (Smith.ShouldSalvage() && OpenWindows.IsSmithNewOpened()) { Smith.SalvageNormals(); } int urshiUp = Urshi.GetUpgradeCount(); if (urshiUp > 0 && OpenWindows.IsUrshiNewOpened()) { Urshi.Upgrade(urshiUp); } if (Orek.ShouldOpen() && OpenWindows.IsOrekNewOpened()) { Orek.Open(); } if (ConfirmDialog.ShouldAccept() && OpenWindows.IsConfirmDialogNewOpened()) { ConfirmDialog.Accept(); } }
public static int Count(string pattern, string source, SearchAlgorithm sa) { int id = (int)sa; List <int> res = new List <int>(); if (id == 0) { res = ApostolicoCrochemore.Search(pattern, source); preProcessTime = ApostolicoCrochemore.preProcessTime; searchTime = ApostolicoCrochemore.searchTime; return(res.Count); } else if (id == 1) { res = ApostolicoGiancarlo.Search(pattern, source); preProcessTime = ApostolicoGiancarlo.preProcessTime; searchTime = ApostolicoGiancarlo.searchTime; return(res.Count); } else if (id == 2) { res = BackwardNondeterministicDawgMatching.Search(pattern, source); preProcessTime = BackwardNondeterministicDawgMatching.preProcessTime; searchTime = BackwardNondeterministicDawgMatching.searchTime; return(res.Count); } else if (id == 3) { res = BackwardOracleMatching.Search(pattern, source); preProcessTime = BackwardOracleMatching.preProcessTime; searchTime = BackwardOracleMatching.searchTime; return(res.Count); } else if (id == 4) { res = BerryRavindran.Search(pattern, source); preProcessTime = BerryRavindran.preProcessTime; searchTime = BerryRavindran.searchTime; return(res.Count); } else if (id == 5) { res = BoyerMoore.Search(pattern, source); preProcessTime = BoyerMoore.preProcessTime; searchTime = BoyerMoore.searchTime; return(res.Count); } else if (id == 6) { res = BruteForce.Search(pattern, source); preProcessTime = BruteForce.preProcessTime; searchTime = BruteForce.searchTime; return(res.Count); } else if (id == 7) { res = Colussi.Search(pattern, source); preProcessTime = Colussi.preProcessTime; searchTime = Colussi.searchTime; return(res.Count); } else if (id == 8) { res = DeterministicFiniteAutomaton.Search(pattern, source); preProcessTime = DeterministicFiniteAutomaton.preProcessTime; searchTime = DeterministicFiniteAutomaton.searchTime; return(res.Count); } else if (id == 9) { res = ForwardDawgMatching.Search(pattern, source); preProcessTime = ForwardDawgMatching.preProcessTime; searchTime = ForwardDawgMatching.searchTime; return(res.Count); } else if (id == 10) { res = GalilGiancarlo.Search(pattern, source); preProcessTime = GalilGiancarlo.preProcessTime; searchTime = GalilGiancarlo.searchTime; return(res.Count); } else if (id == 11) { res = Horspool.Search(pattern, source); preProcessTime = Horspool.preProcessTime; searchTime = Horspool.searchTime; return(res.Count); } else if (id == 12) { res = KarpRabin.Search(pattern, source); preProcessTime = KarpRabin.preProcessTime; searchTime = KarpRabin.searchTime; return(res.Count); } else if (id == 13) { res = KMPSkipSearch.Search(pattern, source); preProcessTime = KMPSkipSearch.preProcessTime; searchTime = KMPSkipSearch.searchTime; return(res.Count); } else if (id == 14) { res = KnuthMorrisPratt.Search(pattern, source); preProcessTime = KnuthMorrisPratt.preProcessTime; searchTime = KnuthMorrisPratt.searchTime; return(res.Count); } else if (id == 15) { res = MaximalShift.Search(pattern, source); preProcessTime = MaximalShift.preProcessTime; searchTime = MaximalShift.searchTime; return(res.Count); } else if (id == 16) { res = MorrisPratt.Search(pattern, source); preProcessTime = MorrisPratt.preProcessTime; searchTime = MorrisPratt.searchTime; return(res.Count); } else if (id == 17) { res = NotSoNaive.Search(pattern, source); preProcessTime = NotSoNaive.preProcessTime; searchTime = NotSoNaive.searchTime; return(res.Count); } else if (id == 18) { res = OptimalMismatch.Search(pattern, source); preProcessTime = OptimalMismatch.preProcessTime; searchTime = OptimalMismatch.searchTime; return(res.Count); } else if (id == 19) { res = QuickSearch.Search(pattern, source); preProcessTime = QuickSearch.preProcessTime; searchTime = QuickSearch.searchTime; return(res.Count); } else if (id == 20) { res = Raita.Search(pattern, source); preProcessTime = Raita.preProcessTime; searchTime = Raita.searchTime; return(res.Count); } else if (id == 21) { res = ReverseColussi.Search(pattern, source); preProcessTime = ReverseColussi.preProcessTime; searchTime = ReverseColussi.searchTime; return(res.Count); } else if (id == 22) { res = ReverseFactor.Search(pattern, source); preProcessTime = ReverseFactor.preProcessTime; searchTime = ReverseFactor.searchTime; return(res.Count); } else if (id == 23) { res = ShiftOr.Search(pattern, source); preProcessTime = ShiftOr.preProcessTime; searchTime = ShiftOr.searchTime; return(res.Count); } else if (id == 24) { res = Simon.Search(pattern, source); preProcessTime = Simon.preProcessTime; searchTime = Simon.searchTime; return(res.Count); } else if (id == 25) { res = SkipSearch.Search(pattern, source); preProcessTime = SkipSearch.preProcessTime; searchTime = SkipSearch.searchTime; return(res.Count); } else if (id == 26) { res = Smith.Search(pattern, source); preProcessTime = Smith.preProcessTime; searchTime = Smith.searchTime; return(res.Count); } else if (id == 27) { res = StringMatchingonOrderedAlphabets.Search(pattern, source); preProcessTime = StringMatchingonOrderedAlphabets.preProcessTime; searchTime = StringMatchingonOrderedAlphabets.searchTime; return(res.Count); } else if (id == 28) { res = TunedBoyerMoore.Search(pattern, source); preProcessTime = TunedBoyerMoore.preProcessTime; searchTime = TunedBoyerMoore.searchTime; return(res.Count); } else if (id == 29) { res = TurboBM.Search(pattern, source); preProcessTime = TurboBM.preProcessTime; searchTime = TurboBM.searchTime; return(res.Count); } else if (id == 30) { res = TurboReverseFactor.Search(pattern, source); preProcessTime = TurboReverseFactor.preProcessTime; searchTime = TurboReverseFactor.searchTime; return(res.Count); } else if (id == 31) { res = TwoWay.Search(pattern, source); preProcessTime = TwoWay.preProcessTime; searchTime = TwoWay.searchTime; return(res.Count); } else if (id == 32) { res = ZhuTakaoka.Search(pattern, source); preProcessTime = ZhuTakaoka.preProcessTime; searchTime = ZhuTakaoka.searchTime; return(res.Count); } else if (id == 33) { res = NET_IndexOf.Search(pattern, source); preProcessTime = NET_IndexOf.preProcessTime; searchTime = NET_IndexOf.searchTime; return(res.Count); } else if (id == 34) { res = NET_IndexOf_Ordinal.Search(pattern, source); preProcessTime = NET_IndexOf_Ordinal.preProcessTime; searchTime = NET_IndexOf_Ordinal.searchTime; return(res.Count); } else { return(0); } }
public Start(Smith smith) { this.smith = smith; }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); // sprites white = Content.Load<Texture2D>("White"); Screen.background = Content.Load<Texture2D>("bgnd"); stexture = Content.Load<Texture2D>("smith"); Create.TLadder = Content.Load<Texture2D>("ladder"); Create.TGround = Content.Load<Texture2D>("ground"); Create.TDeath = Content.Load<Texture2D>("death"); // fonts sf = Content.Load<SpriteFont>("Font"); EndFont = Content.Load<SpriteFont>("Font2"); smith = new Smith(stexture, startpos); AfterLife.getLevel(smith, Screen.Bounds, white, EndFont); Create.t = white; CurrentLevel = L1.getLevel(smith, Window.ClientBounds, white); CurrentLevel.LoadNext(); }