SHARE
TWEET

Untitled

a guest Jul 15th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.         static boolean checkGameWon(String secretWord, ArrayList<Character>lettersGuessed) //retrieves a boolean True if all the letters in secretWord are in lettersGuessed
  10.  
  11.         //loop through the letters of secretWord.
  12.         for (int index = 0; index<secretWord.length; index++){
  13.             if (lettersGuessed.contains(secretWord.charAt(index))){
  14.                 return false; }
  15.             }
  16.     }
  17.    
  18.    
  19.     static boolean getWordProgress(String secretWord, ArrayList<Character>lettersGuessed)
  20.     //how much of the word
  21.     //returns String comprised of letters and underscores
  22.     //which represent letters not yet guessed in secretWord
  23.     for(int i=0; i<26; i++){
  24.         System.out.print((char ('a'+ i));
  25.     }
  26.    
  27.    
  28.     static boolean getRemainingPossibleLetters(ArrayList<Character>lettersGuessed) //letters left
  29.  
  30.     //returns String comprised of letters that have not yet been guessed
  31.     //the letters should appear in alphabetical order
  32.  
  33.     while (secretWord > 0){
  34.         secretWord.length = y;
  35.         for (int i = 0; y>0; i++){
  36.             System.out.print("_ ");
  37.             System.out.print("abcdefghijklmnopqrstuvwxyz")
  38.             lettersGuessed = nex
  39.             }
  40.     }
  41. }
  42.  
  43. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top