From b2bd8eb462f222db64efbc729c6ce2cfb5b65d61 Mon Sep 17 00:00:00 2001 From: lempamo Date: Sat, 25 Feb 2017 20:28:58 -0500 Subject: Added custom wordlist feature to shiftletters --- ShiftOS.WinForms/Applications/ShiftLetters.cs | 50 +++++++++++++-------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'ShiftOS.WinForms/Applications/ShiftLetters.cs') diff --git a/ShiftOS.WinForms/Applications/ShiftLetters.cs b/ShiftOS.WinForms/Applications/ShiftLetters.cs index 0dd1505..4e02e3c 100644 --- a/ShiftOS.WinForms/Applications/ShiftLetters.cs +++ b/ShiftOS.WinForms/Applications/ShiftLetters.cs @@ -46,6 +46,11 @@ namespace ShiftOS.WinForms.Applications string word = ""; static Random rng = new Random(); string guessedCharacters = ""; + List shiftWordlist = new List { "shiftos", "devx", "artpad", "shifter", "pong", + "shiftorium", "codepoints", "shiftletters", "shops", "mud", "notification", "namechanger", + "skinning", "skinloader", "calculator", "fileskimmer", "lua", "shiftnet", "terminal", "textpad"}; + List contributorsWordlist = new List { "12padams", "carverh", "computelinux", "lempamo", + "wowmom98", "michaeltheshifter", "arencclc", "therandommelon", "pfg", "craftxbox"}; public ShiftLetters() { @@ -56,34 +61,14 @@ namespace ShiftOS.WinForms.Applications { guessedCharacters = ""; lives = 7; + comboBox1.Visible = false; tbguess.Visible = true; lbllives.Visible = true; lblword.Visible = true; btnrestart.Visible = false; - var wordlist = new List - { - "shiftos", - "devx", - "artpad", - "shifter", - "pong", - "shiftorium", - "codepoints", - "shiftletters", - "shops", - "mud", - "notification", - "namechanger", - "skinning", - "skinloader", - "calculator", - "fileskimmer", - "lua", - "shiftnet", - "terminal", - "textpad" - }; - word = wordlist[rng.Next(wordlist.Count)]; + if ((String)comboBox1.SelectedItem == "ShiftOS") word = shiftWordlist[rng.Next(shiftWordlist.Count)]; + else if ((String)comboBox1.SelectedItem == "Contributors") word = contributorsWordlist[rng.Next(contributorsWordlist.Count)]; + else throw new NullWordlistException(":P"); lbllives.Text = "You have 7 lives left!"; lblword.Text = ""; for (int i=0; i Date: Sat, 25 Feb 2017 20:34:17 -0500 Subject: removed numbers --- ShiftOS.WinForms/Applications/ShiftLetters.Designer.cs | 2 +- ShiftOS.WinForms/Applications/ShiftLetters.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'ShiftOS.WinForms/Applications/ShiftLetters.cs') diff --git a/ShiftOS.WinForms/Applications/ShiftLetters.Designer.cs b/ShiftOS.WinForms/Applications/ShiftLetters.Designer.cs index 928ff82..48e77bf 100644 --- a/ShiftOS.WinForms/Applications/ShiftLetters.Designer.cs +++ b/ShiftOS.WinForms/Applications/ShiftLetters.Designer.cs @@ -86,7 +86,7 @@ namespace ShiftOS.WinForms.Applications this.lbllives.Name = "lbllives"; this.lbllives.Size = new System.Drawing.Size(310, 13); this.lbllives.TabIndex = 3; - this.lbllives.Text = "To play, guess numbers and letters by typing in the box."; + this.lbllives.Text = "To play, guess letters by typing in the box."; this.lbllives.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // btnrestart diff --git a/ShiftOS.WinForms/Applications/ShiftLetters.cs b/ShiftOS.WinForms/Applications/ShiftLetters.cs index 4e02e3c..4514157 100644 --- a/ShiftOS.WinForms/Applications/ShiftLetters.cs +++ b/ShiftOS.WinForms/Applications/ShiftLetters.cs @@ -49,8 +49,8 @@ namespace ShiftOS.WinForms.Applications List shiftWordlist = new List { "shiftos", "devx", "artpad", "shifter", "pong", "shiftorium", "codepoints", "shiftletters", "shops", "mud", "notification", "namechanger", "skinning", "skinloader", "calculator", "fileskimmer", "lua", "shiftnet", "terminal", "textpad"}; - List contributorsWordlist = new List { "12padams", "carverh", "computelinux", "lempamo", - "wowmom98", "michaeltheshifter", "arencclc", "therandommelon", "pfg", "craftxbox"}; + List contributorsWordlist = new List { "philipadams", "carverh", "computelinux", "lempamo", + "wowmom", "michaeltheshifter", "arencclc", "therandommelon", "pfg", "craftxbox"}; public ShiftLetters() { -- cgit v1.2.3