freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于java的動物換位游戲軟件設(shè)計課程設(shè)計(編輯修改稿)

2025-04-09 04:12 本頁面
 

【文章內(nèi)容簡介】 來創(chuàng)建對象 autoMoveAnimal。 ? autoMoveAnimal 對象調(diào)用 setPoint( Point[ ])方法將 ChangeAnimalWindow 窗體中 point 數(shù)組的引用傳遞給對象,以便 autoMoveAnimal對象移動 ChangeAnimalWindow窗體中的動物。 ? actionPerformed( ActionEvent)是接口 ActionListener中的方法。當(dāng)用戶單擊 bStart、 bStop、bContinue 或 bClose 當(dāng)中任何一個按鈕時, autoMoveDisc 對象將調(diào)用執(zhí)行 actionPerformed( ActionEvent)方法,該方法的操作是,如果用戶單擊了 bStart按鈕,就按著 moveStep中的步驟開始移動盤子;如果單擊了 bStop 按鈕,就暫停移動盤子;如果單擊了 bContinue 按鈕,就恢復(fù)移動盤子;如果單擊了 bClose按鈕,就關(guān)閉當(dāng)前對話框,并停止移動盤子。 ? autoMoveAnimal 對 象調(diào) 用 setStep () 方 法設(shè) 置 step 對 象 中的 數(shù) 據(jù)。 step 是ArrayListInteger,存放著移動“動物”的步驟,這些步驟是 setStep()用算法生成了整數(shù)序列,例如,當(dāng) step 中存放的整數(shù)序列是“ 4,3,2,4”時,那么該序列表示了兩個連續(xù)的移動步驟:“將 point[4]上的動物移動到 point[3]上”和“將 point[2]上的動物移動到 point[4]上”。 沈陽理工大學(xué)課程設(shè)計報告 13 4 關(guān)鍵 類成員函數(shù)流程圖及代碼 系統(tǒng)流程圖 圖 41 系統(tǒng)總體流程圖 開始 進(jìn)入游戲界面 是否選擇級別 進(jìn)入所選級別等級 是否選擇動物圖像 進(jìn)入選擇動物圖像界面 游戲開始 是否相鄰兩個圖片相同 游戲終止 自動演示游戲結(jié)果 是否要重新開始 是否要自動演示 是否達(dá)到英雄榜記錄 撤銷游戲 輸入游戲者信息 是否游戲成功 繼續(xù)游戲 游戲結(jié)束 是 否 是 否 是 否 否 否 否 是 是 是 是 否 沈陽理工大學(xué)課程設(shè)計報告 14 import .*。 import .*。 import .*。 import 。 import .*。 import .*。 public class ChangeAnimalWindow extends JFrame implements ActionListener { int amountOfAnimal=6。 int distance=80。 Animal [] animal。 Point [] point。 Stone [] stone。 HandleMouse handleMouse。 AutoMoveAnimal autoMoveAnimal。 File leftImageFile,rightImageFile。 File fileOneGrade,fileTwoGrade,fileThreeGrade,filecustomGrade。 JButton renew,quit,autoButton=null。 JMenuBar bar。 JMenu menuGrade,menuImage,menuHelp,menuHero。 JMenuItem oneGradeResult,twoGradeResult,threeGradeResult,customGradeResult。 JMenuItem oneGradeItem,twoGradeItem,threeGradeItem,limitTime。 JMenuItem custom。 JMenuItem helpcontent,aboutUs。 JMenuItem leftIamge,rightIamge,defaultImage。 JPanel pCenter。 ShowRecordDialog showDiolag=null。 ChangeAnimalWindow() { pCenter=new JPanel()。 ()。 (null)。 handleMouse=new HandleMouse()。 autoMoveAnimal=new AutoMoveAnimal()。 leftImageFile=new File()。 rightImageFile=new File()。 init()。 bar=new JMenuBar()。 menuGrade=new JMenu(選擇級別 )。 oneGradeItem=new JMenuItem(初 級 )。 twoGradeItem=new JMenuItem(中 級 )。 threeGradeItem=new JMenuItem(高 級 )。 custom=new JMenuItem(自定義 )。 leftIamge=new JMenuItem(左面動物的圖像 )。 rightIamge=new JMenuItem(右面動物的圖像 )。 沈陽理工大學(xué)課程設(shè)計報告 15 defaultImage=new JMenuItem(左右面動物的默認(rèn)圖像 )。 limitTime=new JMenuItem(我超時了嗎 )。 (oneGradeItem)。 (twoGradeItem)。 (threeGradeItem)。 (custom)。 (leftIamge)。 (rightIamge)。 (defaultImage)。 (oneGradeResult)。 (twoGradeResult)。 (threeGradeResult)。 (customGradeResult)。 (limitTime)。 (helpcontent)。 (aboutUs)。 (menuGrade)。 (menuImage)。 (menuHero)。 (menuHelp)。 setJMenuBar(bar)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 (this)。 renew=new JButton(重新開始 )。 (this)。 autoButton=new JButton(自動演示 )。 (this)。 quit=new JButton(撤消 )。 (this)。 JPanel north=new JPanel()。 (renew)。 (quit)。 (autoButton)。 String mess=互換左右動物位置 。 JLabel hintMess=new JLabel(mess,)。 (hintMess)。 add(north,)。 add(pCenter,)。 JPanel south=new JPanel()。 沈陽理工大學(xué)課程設(shè)計報告 16 (handleMouse)。 add(south,)。 setVisible(true)。 setBounds(60,60,710,300)。 validate()。 setDefaultCloseOperation()。 if(!()){ try { ()。 } catch(IOException exp){} } if(!()){ try { ()。 } catch(IOException exp){} } if(!()){ try { ()。 } catch(IOException exp){} } if(!()){ try { ()。 } catch(IOException exp){} } =fileOneGrade。 showDiolag=new ShowRecordDialog()。 } public void init() { animal=new Animal[amountOfAnimal]。 point=new Point[amountOfAnimal+1]。 stone=new Stone[amountOfAnimal+1]。 int space=distance。 for(int i=0。i。i++) { point[i]=new Point(space,100)。 space=space+distance。 } for(int i=0。i。i++) { animal[i]=new Animal()。 animal[i].addMouseListener(handleMouse)。 if(i) { animal[i].setIsLeft(true)。 } else //if(i) { animal[i].setIsLeft(false)。 沈陽理工大學(xué)課程設(shè)計報告 17 } //else if(i==+1) //{ //if(animal[i].equals(animal[i])) //animal[i].setIsLeft(true)。 //else // animal[i].setIsLeft(false)。 //} } for(int i=0。i。i++) { stone[i]=new Stone()。 (stone[i])。 stone[i].setSize(distance*8/9,18)。 int w=stone[i].getBounds().width。 int h=stone[i].getBounds().height。 stone[i].setLocation(point[i].getX()w/2,point[i].getY())。 point[i].setThisStone(stone[i])。 } for(int i=0。i。i++) { animal[i].setSize(distance*6/7,distance*3/4)。
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1