Commit Graph

14 Commits

Author SHA1 Message Date
raul 6656971e10 Spaced guesses no longer pass sanity checks
Players could input guesses such as "b FOOBAR" with the program still
picking up the "b" character, any input with spaces in it will now be
ignored.
2024-02-23 07:37:28 +00:00
raul f93efc0986 Fixed errors when entering empty input
Submitting an empty guess would cause the game to print one of the two
"Already guessed" lines, now it checks for empty input and ignores it
accordingly.

Also, I assigned the guess variable to an empty string at the end of the
game() loop to reset it because I realized that inputting empty strings
after a single guess would cause the same bug to re-appear because the
variable hadn't changed from last attempt.
2024-02-22 07:19:20 +00:00
raul 5e1c4315fc Improved error handling for inputting lives
Also added the ability to view the secret word after losing
2024-02-20 08:26:01 +00:00
raul 75d3b08974 Added OS-agnostic screen clearing 2024-02-19 10:56:42 +00:00
raul 4a6b4d28c7 Added checking for already correct guesses 2024-02-18 11:33:51 +01:00
raul 894cd5c7c2 Cleaned up code for checking already guessed chars 2024-02-16 09:29:22 +00:00
raul d8983f8591 Merge branch 'main' of https://git.bulgariu.xyz/raul/hangman 2024-02-15 10:53:21 +00:00
raul 106e52df0b Testing LICENSE name 2024-02-15 10:51:01 +00:00
raul d7398d67bd Merge pull request 'Merging testing into main' (#1) from testing into main
Reviewed-on: #1
2024-02-15 10:22:55 +01:00
raul da6d477a02 Another branch testing commit 2024-02-15 09:20:18 +00:00
raul 0bb8fee9a3 Testing pushing to another branch 2024-02-15 09:12:34 +00:00
raul 8beacab86b Added checking for repeating wrong characters 2024-02-15 06:50:36 +01:00
raul 729d871229 Moved file-reader into its own repo
Accidentally built hangman while practicing opening and reading from
text files. This is fun
2024-02-14 11:23:43 +00:00
raul 27ce3d859e Initial commit 2024-02-14 12:21:01 +01:00