import javax.swing.*;
import java.io.*;

/**
 *  The driver for the Hangman game.
 */
public class PlayHangman {
  
  /** 
   * The number of arguments needed to specify 
   * the filename and the maximum number of incorrect guesses. 
   */
  private static final int NUM_ARGS_SPECIFIC = 2;  
  
  /** The number of arguments needed to specify just the filename. */
  private static final int NUM_ARGS_FILENAME = 1; 
    
  
  /** 
   * The main method for the Hangman game.
   * 
   * @param args The data needed to run the game.
   */
  public static void main(String[] args) throws IOException {
    
    // check for incorrect usage
    if (args.length > NUM_ARGS_SPECIFIC) {
      JOptionPane.showMessageDialog(null, "USAGE: PlayHangman "
                                      + "<filename> <maxMistakes>",
                                    "WARNING", JOptionPane.WARNING_MESSAGE);
    } else {
      
      // FILL THIS IN WITH YOUR OWN CODE
      
      if (args.length == NUM_ARGS_SPECIFIC) {
        
        // FILL THIS IN WITH YOUR OWN CODE
        
      } else if (args.length == NUM_ARGS_FILENAME) {
        
        // FILL THIS IN WITH YOUR OWN CODE
        
      } else {
        
        // You need to get the filename and the max. mistakes value
        // from the player - think about what the best way to do both
        // these tasks is!
                
        // FILL THIS IN WITH YOUR OWN CODE
        
      }
      
      // HINT: MORE CODE COULD GO HERE 
      
    } 
  }
}
