import java
public class FiveChessGame {
private int temp;
private String[][] String
////////////////////////////
public FiveChessGame(){
System
Scanner sc=new Scanner(System
this
String
for(int i=
for(int j=
String
}
}
System
for(int i=
System
System
}
System
for(int i=
System
System
for(int j=
System
}
System
}
}
////////////////////
public int getline(){
return this
}
///////////////////////
public String[][] getString(){
return this
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
import java
public class FiveChessPlayers {
private String name;
public static FiveChessGame fcg=new FiveChessGame();
//////////////////////
public FiveChessPlayers(){//玩多少行的游戲
System
Scanner sc=new Scanner(System
this
}
///////////////////
public String getName(){
return this
}
////////////////////////////////
public void play(String str
Scanner sc=new Scanner(System
int x
while(true){
System
x=sc
y=sc
if(x>=fcg
System
continue;
}
if(fcg
fcg
break;
}else{
System
continue;
}
}
}
}
////////////////////////////////////////////////////////////////////////////////////////////////
import java
public class TestChess {
private FiveChessPlayers f
private FiveChessPlayers f
public TestChess(){
f
f
}
///////////////////////////////////////////////////////////////////////////
public void display(){
System
for(int i=
System
System
}
System
for(int i=
System
System
for(int j=
System
}
System
}
}
//////////////////////////////////////////////////////////////////////////////
public void putChess(String tem
if(tem
{
f
}
if(tem
{
f
}
}
/////////////////////////////////////////////////////////
public void victory(){
String str
String str
////////////////////////////////////
int X=
int k=
///////////////////////////////////
while(true)
{
LABEL:for(;k<FiveChessPlayers
for(j=(j+
//注意在這裡的這個表達式的寫法
if(FiveChessPlayers
X=k;
Y=j;
break LABEL;//每找到一個相同字符則跳出
}else{
System
System
// continue;//多余
}
}
}
// System
if(k<FiveChessPlayers
{
for(int i=
if(X<FiveChessPlayers
str
if(i!=
continue;
if(i==
System
if(str
System
System
}else{
str
}
}
}
}
for(int i=
if((X+
str
if(i!=
continue;
if(i==
System
if(str
System
System
}else{
str
}
}
}
}
for(int i=
if((X+
str
if(i!=
continue;
if(i==
System
if(str
System
System
}else{
str
}
}
}
}
for(int i=
if((X+
str
if(i!=
continue;
if(i==
System
if(str
System
System
}else{
str
}
}
// str
// continue;
// str
// continue;
}
}
}
//////////////////////////////////////////////////////////////////////////////
if(str
j++;
continue ;
}else{
break;
}
}
}
////////////////////////////////////////////////////////////////////
public void victory
String str
String str
////////////////////////////////////
int X=
int k=
while(true)
{
LABEL:for(;k<FiveChessPlayers
for(j=(j+
if(FiveChessPlayers
X=k;
Y=j; System
break LABEL;
}else{
System
System
}
}
}
///////////////////////////////////////////////
for(int i=
if(X<FiveChessPlayers
str
if(i!=
continue;
if(i==
System
System
if(str
System
System
}else{
str
}
}
}
}
for(int i=
if((X+
str
if(i!=
continue;
if(i==
System
System
if(str
System
System
}else{
str
}
}
}
}
for(int i=
if((X+
str
if(i!=
continue;
if(i==
System
System
if(str
System
System
}else{
str
}
}
}
}
for(int i=
if((X+
str
if(i!=
continue;
if(i==
System
System
if(str
System
System
}else{
str
}
}
// str
// continue;
// str
// continue;
}
}
//////////////////////////////////////////////////////////////////////////////
if(str
j++;
continue ;
}else{
break;
}
}
}
////////////////////////////////////////
public static void main(String[] args) {
TestChess tc=new TestChess();
boolean b
while(b
tc
tc
tc
tc
tc
tc
Scanner sc=new Scanner(System
System
b
if(!b
System
break;
}
}
}
}
From:http://tw.wingwit.com/Article/program/Java/hx/201311/25560.html