diff options
| author | Aren <[email protected]> | 2017-02-25 16:47:51 +0100 |
|---|---|---|
| committer | Aren <[email protected]> | 2017-02-25 16:47:51 +0100 |
| commit | 57e955e3d4e4c2b9685ad6eba360aec338bf2910 (patch) | |
| tree | bf58ba45e11506e4a50d4e5ebe7c9b0568c683cd /ShiftOS.WinForms/Applications/ShiftLetters.cs | |
| parent | c502062a6285512c95e86763a32c78713a15e9da (diff) | |
| download | shiftos_thereturn-57e955e3d4e4c2b9685ad6eba360aec338bf2910.tar.gz shiftos_thereturn-57e955e3d4e4c2b9685ad6eba360aec338bf2910.tar.bz2 shiftos_thereturn-57e955e3d4e4c2b9685ad6eba360aec338bf2910.zip | |
Improved ShiftLetters and added more words.
Diffstat (limited to 'ShiftOS.WinForms/Applications/ShiftLetters.cs')
| -rw-r--r-- | ShiftOS.WinForms/Applications/ShiftLetters.cs | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/ShiftOS.WinForms/Applications/ShiftLetters.cs b/ShiftOS.WinForms/Applications/ShiftLetters.cs index 19ee79e..6ff528a 100644 --- a/ShiftOS.WinForms/Applications/ShiftLetters.cs +++ b/ShiftOS.WinForms/Applications/ShiftLetters.cs @@ -44,6 +44,7 @@ namespace ShiftOS.WinForms.Applications int lives = 7; string word = ""; static Random rng = new Random(); + string guessedCharacters = ""; public ShiftLetters() { @@ -52,6 +53,7 @@ namespace ShiftOS.WinForms.Applications private void StartGame() { + guessedCharacters = ""; lives = 7; tbguess.Visible = true; lbllives.Visible = true; @@ -61,11 +63,24 @@ namespace ShiftOS.WinForms.Applications { "shiftos", "devx", - "delicious", + "artpad", "shifter", "pong", "shiftorium", - "codepoints" + "codepoints", + "shiftletters", + "shops", + "mud", + "notification", + "namechanger", + "skinning", + "skinloader", + "calculator", + "fileskimmer", + "lua", + "shiftnet", + "terminal", + "textpad" }; word = wordlist[rng.Next(wordlist.Count)]; lbllives.Text = "You have 7 lives left!"; @@ -100,7 +115,7 @@ namespace ShiftOS.WinForms.Applications { if (this.tbguess.Text.Length == 1) { - var charGuessed = this.tbguess.Text; + var charGuessed = this.tbguess.Text.ToLower(); bool correct = false; this.tbguess.Text = ""; for (int i=0; i < word.Length; i++) @@ -118,14 +133,15 @@ namespace ShiftOS.WinForms.Applications lives = 0; lbllives.Visible = true; btnrestart.Visible = true; - long cp = word.Length * oldlives; + int cp = word.Length * oldlives; lbllives.Text = "You earned: " + cp + " codepoints!"; - ShiftOS.Engine.SaveSystem.CurrentSave.Codepoints += cp; + SaveSystem.TransferCodepointsFrom("shiftletters", cp); } } } - if (correct == false & lives > 0) + if (correct == false & lives > 0 & !guessedCharacters.Contains(charGuessed)) { + guessedCharacters = guessedCharacters + charGuessed; lives--; lbllives.Text = "You have: " + lives + " lives left!"; if (lives == 0) |
