Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Ronen Beliakov
3,572 Pointshaving a problem with the prompter
https://teamtreehouse.com/workspaces/33046772# bad source file for Prompter prompter = new Prompter(game);
Simon Coates
28,695 PointsI think the workspace URL is only available to you. You want to share a snapshot URL (see https://teamtreehouse.com/library/previews-and-snapshots )
Steve Hunter
57,712 PointsYep - hit the camera icon and we can then fork it and view your code. Once you've done that we can try to get you back up and running!
2 Answers
Simon Coates
28,695 Pointsyou made a few spelling mistakes:
import java.util.Scanner; //spelling mistake
class Prompter { //spelling mistake
private Game game;
public Prompter(Game game){
this.game = game;
}
public boolean promptForGuess() {
Scanner scanner =new Scanner(System.in);
System.out.print("Enter a letter: ");
String guessInput = scanner.nextLine();
char guess = guessInput.charAt(0);
return game.applyGuess(guess); //spelling mistake
}
}
Simon Coates
28,695 PointsI fixed a couple spelling mistakes (see the lines with comments). I compiled and hangman ran okay.
Ronen Beliakov
3,572 Pointstnx it's working now.
Steve Hunter
57,712 PointsSteve Hunter
57,712 PointsCan you share your workspace again - that link isn't working. Use the fork icon and share that URL.
Thanks,
Steve.