import java.io.*;
import javagently.*;

class PlayGame {

  /* The Playing Game program      by J M Bishop   Aug 1996
   * ------------------------      Java 1.1
   *                               updated June 2000
   * Driver for playing Rocks-Scissors-Paper.
   * Calls methods in the RSP class to get
   * my choice and the computer's choice and
   * display who has won until Q is typed.
   * Illustrates conditional loops and objects
   */

  public static void main (String [] args) throws IOException {
    new PlayGame ();
  }

  PlayGame () throws IOException {

    RSPGame mygame = new RSPGame ();
    mygame.startGame ();

    while (true) {
      mygame.makemyChoice();
      if (mygame.getyourChoice ()=='Q') break;
      mygame.winner();
    }
    System.out.println("Thanks for playing");
  }
}
