public static String[] getWords(int cat, int diff)
{
String topic[][][] = new String[3][3][3];
switch(cat){
case 0:
topic[0][0][0] = "Paris";
topic[0][0][1] = "London";
topic[0][0][2] = "Sydney";
diff = 0;
topic[0][1][0] = "Toronto";
topic[0][1][1] = "Florida";
topic[0][1][2] = "Frankfurt";
diff = 1;
topic[0][2][0] = "Barcelona";
topic[0][2][1] = "Vancouver";
topic[0][2][2] = "Zimbabwe";
diff = 2;
case 1:
topic[1][0][0] = "Halo";
topic[1][0][1] = "Fifa";
topic[1][0][2] = "GTA";
diff = 0;
topic[1][1][0] = "Skyrim";
topic[1][1][1] = "HITMAN";
topic[1][1][2] = "Batman";
diff =1;
topic[1][2][0] = "Minecraft";
topic[1][2][1] = "Zombieville";
topic[1][2][2] = "BoderLands";
diff =2;
case 2:
topic[2][0][0] = "Acura";
topic[2][0][1] = "Audi";
topic[2][0][2] = "Bmw";
diff = 0;
topic[2][1][0] = "Bentley";
topic[2][1][1] = "Buggati";
topic[2][1][2] = "Honda";
diff = 1;
topic[2][2][0] = "Lamborghini";
topic[2][2][1] = "Rolls-Royce";
topic[2][2][2] = "Mercedes";
diff = 2;
}
return topic[cat][diff];
這將是3D數組,並有3個選項,其中包括水平diffivculty和類別,我怎麼稱呼它,並使用它,就好像人選擇這個...它會通過數組並選擇這個我打算把這個方法,並在主要方法調用它如何在遊戲Hang子手中使用3D陣列?
你的電影被假設是地方 –
也是你的編輯沒有顯示出來 – RGdev
做u如何使其顯示,它正顯示出我 –