diff options
| author | Michael <[email protected]> | 2017-02-25 21:58:57 -0500 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-02-25 21:58:57 -0500 |
| commit | 4e00fc827d5f1b57c809858252c4c513100543fe (patch) | |
| tree | e1921a30c1cf17b949ea0906b768782048a2c309 /ShiftOS.WinForms | |
| parent | 973512118b101cc61b346d6108fe90c03c8dccda (diff) | |
| download | shiftos_thereturn-4e00fc827d5f1b57c809858252c4c513100543fe.tar.gz shiftos_thereturn-4e00fc827d5f1b57c809858252c4c513100543fe.tar.bz2 shiftos_thereturn-4e00fc827d5f1b57c809858252c4c513100543fe.zip | |
massive shiftletters improvements
Diffstat (limited to 'ShiftOS.WinForms')
| -rw-r--r-- | ShiftOS.WinForms/Applications/ShiftLetters.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ShiftOS.WinForms/Applications/ShiftLetters.cs b/ShiftOS.WinForms/Applications/ShiftLetters.cs index 0dd1505..2578669 100644 --- a/ShiftOS.WinForms/Applications/ShiftLetters.cs +++ b/ShiftOS.WinForms/Applications/ShiftLetters.cs @@ -83,7 +83,21 @@ namespace ShiftOS.WinForms.Applications "terminal", "textpad" }; + //This can diversify the amount of ShiftOS-related words in the game. + foreach(var upg in Shiftorium.GetDefaults()) + { + foreach(var w in upg.Name.Split(' ')) + { + if (!wordlist.Contains(w.ToLower())) + wordlist.Add(w.ToLower()); + } + } word = wordlist[rng.Next(wordlist.Count)]; + while(word == lastword) + { + word = wordlist[rng.Next(wordlist.Count)]; + } + lastword = word; //to make the game not choose the same word twice or more in a row lbllives.Text = "You have 7 lives left!"; lblword.Text = ""; for (int i=0; i<word.Length; i++) @@ -112,6 +126,8 @@ namespace ShiftOS.WinForms.Applications } + string lastword = ""; + private void tbguess_TextChanged(object sender, EventArgs e) { if (this.tbguess.Text.Length == 1) |
