

public class GameController{

  private int level_;

  public GameController(){
  }

  public void startGame(){

    System.out.println("Hello!  Welcome to Danah's Minesweeper");
    if (this.askLevel()){
      this.createGame();
    }
    else {
      System.out.println("Oh well, thanks for trying!");
    }

  }
    

  public boolean askLevel(){

    System.out.println("What level would you like to play?");
    System.out.println("1=Beginner, 2=Intermediate, 3=Advanced (0 for no play)");
    level_ = ReadInput.getInt();

    System.out.println("You have chosen level " + level_);

    /* Since 0 is no play, we check for no play and return whether
     * or not we got a zero.  I don't know what to do if they type 
     * something that is not correct...
     */
    if (level_ != 0){
      return true;
    }
    else return false;
  }

  public void createGame(){
    /* eventually, this will create a real game but for now
     * I will just print out an array of the appropriate size
     */
    
    int xSize, ySize;
    
    if (level_ == 1){
      xSize = 8;
      ySize = 8;
    }
    else if (level_ == 2){
      xSize = 16;
      ySize = 16;
    }
    else if (level_ == 3){
      xSize = 16;
      ySize = 30;
    }
    else {
      System.out.println("What size x would you like?");
      xSize = ReadInput.getInt();
      System.out.println("What size y would you like?");
      ySize = ReadInput.getInt();
    }

    for (int y=0; y<ySize; y++){
      for (int x=0; x<xSize; x++){
	System.out.print(" x ");
      }
      System.out.println("");
    }
  }


 }
