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

正文內(nèi)容

基于java的掃雷游戲課程設(shè)計-文庫吧

2025-05-14 08:19 本頁面


【正文】 JFrame(掃雷 )。 panel = new myPanel()。 //框架及面板 startButton = new JButton()。 (重新開始 )。 (new Font(楷書,15))。 (false)。 (new startListener())。 aboutButton = new JButton()。 (關(guān)于 )。 (new Font(楷書,15))。 (false)。 (new aboutListener())。 recordButton = new JButton()。 (記錄 )。 (new Font(楷書 ,15))。 (new recordListener())。 (false)。 //按鈕 (350, 220, 30, 30)。 ()。 startTime = ()。 ()。 (null)。 ()。 (320, 40, 100, 30)。 (startButton)。 (320,100,100,30)。 (recordButton)。 (320,160,100,30)。 (aboutButton)。 (timeLabel)。 (450, 340)。 (true)。 (JFra)。 (panel)。 //框架布局 } void setBoom() //生成虛擬雷盤的雷區(qū) { for(int row = 0。row14。row++) for(int col = 0。col14。col++) { boom[row][col] = new Button()。 visualBoom[row][col] = 0。 } //初始化雷區(qū) for(int i = 0。i14。i++) { visualBoom[0][i] = 2。 visualBoom[i][0] = 2。 visualBoom[i][13] = 2。 visualBoom[13][i] = 2。 } //虛擬雷盤封邊 int x,y。 Random r = new Random()。 for(int count = 0。count16。) { x = (12)。 y = (12)。 if(visualBoom[x+1][y+1] == 0) { visualBoom[x+1][y+1] = 1。 count++。 } } } //生成地雷,邊緣 :2 雷點 :1 正常點 :0 void handleBoom(){ //炸彈信息轉(zhuǎn)化 int temp[][] = new int[14][14]。 for(int row = 0。row14。row++) for(int col = 0。col14。col++) { temp[row][col] = visualBoom[row][col]。 } for(int row = 1。row13。row++) for(int col = 1。col13。col++) { temp[row][col] = countBoom(row,col)。 } numOfBoom = 0。 visualBoom = temp。 } int countBoom(int x,int y){ //周圍炸彈計數(shù)器 int count = 0。 if(visualBoom[x][y] != 1) { if(visualBoom[x1][y1] == 1) count++。 if(visualBoom[x][y1] == 1) count++。 if(visualBoom[x+1][y1] == 1) count++。 if(visualBoom[x+1][y] == 1) count++。 if(visualBoom[x+1][y+1] == 1) count++。 if(visualBoom[x][y+1] == 1) count++。 if(visualBoom[x1][y+1] == 1) count++。 if(visualBoom[x1][y] == 1) count++。 }else count = 1。 return count。 } //雷 :1 雷數(shù) :(int) void showButton() //加入雷區(qū)按鈕到面板上 { for(int row = 1。row13。row++) for(int col = 1。col13。col++) { boom[row][col].setBounds((row1)*25, (col1)*25, 25, 25)。 boom[row][col].setFocusable(false)。 boom[row][col].addActionListener(new buttomListener(row,col))。 boom[row][col].addMouseListener(new rightClick(row,col))。 (boom[row][col])。 } } class myPanel extends JPanel{ //面板內(nèi)部類 public void paintComponent(Graphics g) { ()。 (0, 0, 300, 300)。 ()。 for(int line = 0。line=300。line+=25) (line, 0, line, 300)。 for(int row = 0。row=300。row+=25) (0, row, 300, row)。 //繪制基本格 (new Font(楷書,13))。 (MineSweeper Ver , 305, 20)。 //繪制版本信息 (時間 ,310,240)。 for(int row = 1。row13。row++)
點擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1