Rate my hangman game

rate my hangman game
import java.util.*;

public class Hangman {
public static void main(String[] args) {
Scanner console = new Scanner(System.in);
System.out.print("test string: (this is the answer) ");
String ans = console.next();

String guess = "";
for (int i = 0; i < ans.length(); i++) {
guess += "_";
}

while (!guess.equalsIgnoreCase(ans)) {
System.out.println("Current status: " + guess );
System.out.print("Guess a letter: ");
char letter = console.next().charAt(0);
for (int i = 0; i < ans.length(); i++) {
if (ans.charAt(i) == letter) {
guess = guess.substring(0,i) + letter + guess.substring(i+1,ans.length());
}
}
}
}
}

Attached: 1521624331726.png (500x725, 439K)

Other urls found in this thread:

pixiv.net/member_illust.php?mode=medium&illust_id=67521092
twitter.com/SFWRedditGifs

Sauce of Pic, OP?

Post full pic

Attached: ADE745B4-2279-4ACC-A06D-B4D963E54EBA.gif (500x660, 174K)

>importing everything from util at once
but y

yaguo on gelbooru
Lazy fucks.

This is gay and degenerate wtf is wrong with you faggots why are you fapping to this shit?

Judging by what's on the OP it could've only been either a little girl or a really thin guy.
Your pick which is worse.

pixiv.net/member_illust.php?mode=medium&illust_id=67521092

god bless

Is that really her butt?

>her

*breaths in
HIIIIIIIIIIIIIIDEEEEEEEEEERRRRRIIIIIIIIIIIIII

btw in c++ this is just

auto hangman (const String word, const RBTree(char) guessed)
{
const newSet = guessed += promptChar();

if( stream(word) | map(unique) | collectSet == guessed) return true;
if( (guessed | filter( unContained(word) | collectList)eval().size() > 8) return false

return hangman (word, newSet);
}


all data structures are pure functional, structual sharing
uses pure functional lazy static range adapters
imlementation of the unique applicative and promptChar is trivial and left as an exercise to the reader

Attached: Illya 1200 (DI).jpg (1920x1080, 177K)

Sorry for being a brainlet, but in the last if, it's for replacing underscore with the correct character, right? But I don't quite get how this line works:
guess = guess.substring(0,i) + letter + guess.substring(i+1,ans.length());

Nvm, I think I get it.

She's so cute

Yeah, I wish that was me.

>sets ans to "_"

>her
>she

Enough with this shitty meme

it's literally a male character, though

It is a male character, you can look at the penis here . The whole traps aren't gay meme thing needs to die, it turns too many people into faggots.

You just don't want people to be happy

Attached: KobQKdF.png (723x684, 156K)

>She

Pedos detected

Can we talk about the code instead of the girl?

>girl

I do login with Google but seriously fuck off I don't feel like logging in right now just to view a single God damn image especially on that cockblock roadblock shithole of a website, pixiv is pathetic bullshit

Attached: Screenshot_2018-10-20-09-19-14.jpg (1080x1920, 429K)

please respond

You shouldn't have posted a semen demon as your OP

177 KB

*breaths in
HIIIIIIIIIIIIIIDEEEEEEEEEERRRRRIIIIIIIIIIIIII

btw in c++ this is just
auto hangman (const String word, const RBTree(char) guessed)
{
const newSet = guessed += promptChar();

if( stream(word) | map(unique) | collectSet == guessed) return true;
if( (guessed | filter( unContained(word) | collectList)eval().size() > 8) return false

return hangman (word, newSet);
}

all data structures are pure functional, structual sharing
uses pure functional lazy static range adapters
imlementation of the unique applicative and promptChar is trivial and left as an exercise to the reader

Attached: Illya 1235 (PY).jpg (1003x2006, 1.06M)

>two bloodlines end after millions of years of struggle and perseverance
sounds like pure happiness there mate

Attached: iwata.jpg (478x463, 158K)