www.pudn.com > RSC.rar > RSC.java


//package rsc; 
import javax.swing.*; 
import java.io.*; 
import java.util.*; 
 
/** 
	File Name:    RSC.java 
	Author:	»ÆÔö²©   #B02251132 
	Date:		March 20 2004 
	Description:	This program would like to program the computer to play this game 
                        against a human. Each will make a choice and the computer 
                        will work out who won. 
**/ 
 
public class RSC { 
  public static void main(String[] args)throws IOException{ 
     String player=null; 
     String computerstring=null; 
     String winner=null; 
     int you=1000; 
     int computer=1000; 
     BufferedReader stdn = new BufferedReader(new InputStreamReader(System.in)); 
     String r; 
     int seed; 
     boolean isDigit; 
     System.out.println("Enter the seed:"); 
     do{ 
     isDigit=true; 
     r=stdn.readLine();//input the string 
     for(int i=0;i