[20點]eclipsejava小遊戲程式 - Play

Table of Contents

請幫忙我寫一個java小遊戲程式架構是由剪刀石頭布改過來,題目為(棒打老虎雞吃蟲)棒子打老虎,老虎吃雞,雞吃蟲,蟲咬棒子要在eclipse下寫。非伸手族,只是對java的架構跟基礎參數很不懂。如果是c語言大概五分鐘就搞定,但是是eclipsejava,有點摸不透...有任何idea都可以提供,蠻急的謝謝:)...Showmore

All Comments

Audriana avatarAudriana2010-05-28
請問你這個遊戲是玩家選擇(棒,老虎,雞,蟲)然後電腦亂數選出(棒,老虎,雞,蟲)然後決定誰贏是這樣嗎?2010-05-2701:49:40補充:importjava.util.*;publicclasslittlegame{//0-playerwin,1-computerwin,2-tie,4-errorcodepublicintgameEngine(intplayerChoice,intcomChoice){if(playerChoice==1){if(comChoice==2)return0;elseif(comChoice==4)return1;elsereturn2;}elseif(playerChoice==2
Ingrid avatarIngrid2010-05-28
我怎麼感覺你的code別人會看的很痛苦.....=.="