java編寫飛行棋

2021-08-04 03:02:39 字數 1436 閱讀 7635

/** *

*建立地圖類 */

public class test

system.out.println();

for(int i=31;i<=33;i++)

system.out.println(getpamrky(indexa, indexb, i)); }

for(int i=64;i>=34;i--)

system.out.println();

for(int i=65;i<=68;i++)

for(int i=69;i<100;i++) }

/***設定陷阱的方法 */

public void into()else }

//時空隧道

for(int i=1;i<=4;i++)else }

//幸運大輪盤

for(int i=1;i<=4;i++)else }

//暫停

for(int i=1;i<=4;i++)else }

}/**

*  建立玩家地圖

* @return

*/public string getpamrky(int indexa,int indexb,int index) else if (indexa == index) else if (indexb== index) else }

return str; }

}

/***

**建立遊戲開始

/public class begin

/*** 遊戲開始 */

public void show()else

while(true)

if(index2==99) }

//進行兩個玩家的輪流操作

if(turns%2==0)else }

}//第乙個玩家

public void wa()else

if(index1<=1)

//判斷地圖陷阱

switch (t.amp[index1]) else if(xuanzhe==2)

break;

case 4:

system.out.println("暫停一回合");

isb1=true;

break; }

t.showmap(index1,index2);

}   }

//第二個玩家

public void wb()else

if(index2<=1)

switch (index2) else if(xuanb==2)

break;

case 4:

system.out.println("暫停一回合");

isb2=true;

break; }

t.showmap(index1,index2); }

}}

C 編寫飛行棋遊戲

using system using system.collections.generic using system.linq using system.text using system.threading.tasks using system.drawing 繪圖 namespace plane...

騎士飛行棋

include include include include int map 110 bu 1000 char str 4 20 struct node a 3 void f strcpy a 2 name,str m printf 玩家2選擇了 s n n a 2 name printf 人物選...

騎士飛行棋

using system using system.collections.generic using system.linq using system.text namespace 騎士飛行棋 宣告乙個陣列用來存玩家a和玩家b public static string playernames ne...