Advertisement
Guest User

Untitled

a guest
Jul 15th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. import java.util.*;
  2. public class helloWorld {
  3. public static void main(String[]args){
  4. Scanner input=new Scanner(System.in);
  5.  
  6. int y; //y is the number of letters in secretWord
  7. int guess = input.nextInt();
  8. int lives =6; //x is the index that it goes thru
  9.  
  10. }
  11.  
  12. static boolean checkGameWon(String secretWord, ArrayList<Character>lettersGuessed){ //retrieves a boolean True if all the letters in secretWord are in lettersGuessed
  13.  
  14. //loop through the letters of secretWord.
  15. for (int index = 0; index<secretWord.length; index++){
  16. if (lettersGuessed.contains(secretWord.charAt(index))){
  17. return false;
  18. }
  19. }
  20. }
  21.  
  22.  
  23. static boolean getWordProgress(String secretWord, ArrayList<Character>lettersGuessed)
  24. //how much of the word
  25. //returns String comprised of letters and underscores
  26. //which represent letters not yet guessed in secretWord
  27. for(int i=0; i<26; i++){
  28. System.out.print((char ('a'+ i));
  29. }
  30.  
  31.  
  32. static boolean getRemainingPossibleLetters(ArrayList<Character>lettersGuessed) //letters left
  33.  
  34. //returns String comprised of letters that have not yet been guessed
  35. //the letters should appear in alphabetical order
  36.  
  37. while (secretWord > 0){
  38. secretWord.length = y;
  39. for (int i = 0; y>0; i++){
  40. System.out.print("_ ");
  41. System.out.print("abcdefghijklmnopqrstuvwxyz")
  42. lettersGuessed = nex
  43. }
  44. }
  45. }
  46.  
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement