« All Events
6 PM – USACO Bronze – Gamas
May 2 @ 6:00 pm - 7:00 pm
Today We Did
- We went over how to detect if a text is a palindrome.
- We went over how to detect if a text is a palindrome while ignoring spaces.
Homework
- Create word guessing game. This is very similar to hangman, but without the hangman human sticky figure. To draw heart symbol, you need to do this.
String healthSymbol = "\u2665"; // unicode heart symbol.
System.out.println(healthSymbol);
- This is how the game goes
WORD GUESSING GAME
_ _ _ _ _ _
♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥
Enter a letter or the whole world: a
_ _ a _ _ _
♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥
Enter a letter or the whole world: b
_ _ a _ _ _
♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥
Enter a letter or the whole world: b
_ _ a _ _ _
♥ ♥ ♥ ♥ ♥ ♥ ♥
Enter a letter or the whole world: d
d _ a _ _ _
♥ ♥ ♥ ♥ ♥ ♥ ♥
Enter a letter or the whole world: r
d r a _ _ _
♥ ♥ ♥ ♥ ♥ ♥ ♥
Enter a letter or the whole world: g
d r a g _ _
♥ ♥ ♥ ♥ ♥ ♥ ♥
Enter a letter or the whole world: o
d r a g o _
♥ ♥ ♥ ♥ ♥ ♥ ♥
Enter a letter or the whole world: x
d r a g o _
♥ ♥ ♥ ♥ ♥ ♥
Enter a letter or the whole world: x
d r a g o _
♥ ♥ ♥ ♥ ♥
Enter a letter or the whole world: x
d r a g o _
♥ ♥ ♥ ♥
Enter a letter or the whole world: x
d r a g o _
♥ ♥ ♥
Enter a letter or the whole world: x
d r a g o _
♥ ♥
Enter a letter or the whole world: x
d r a g o _
♥
Enter a letter or the whole world: x
Sorry you lost the game. The secret word is 'dragon'.