/*
* 創建一個類Game
*/
public class Game {
/**
* @param args
*/
String[] s ={
//獲取電腦出拳
String getComputer(int i)
{
String computerGuess = s[i];
return computerGuess;
}
//判斷人出拳是否為石頭
boolean isOrder(String guess)
{
boolean b = false;
for(int x =
{
if(guess
{
b = true;
break;
}
}
return b;
}
//比較
void winOrLose(String guess
{
if(guess
{
System
}else if(guess
{
if(guess
{
System
}else
{
System
}
}else if(guess
{
if(guess
{
System
}else
{
System
}
}else if(guess
{
if(guess
{
System
}else
{
System
}
}
}
public static void main(String[] args) {
Game my = new Game();
Game computer = new Game();
Game game = new Game();
String myGuess = javax
String computerGuess = computer
if(my
{
game
}else
{
System
}
}
}
From:http://tw.wingwit.com/Article/program/Java/hx/201311/26003.html