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

正文內(nèi)容

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

2025-01-01 04:58 本頁面


【正文】 eMenu。 JMenuItem 初級,中級,高級,掃雷英雄榜。 MineArea mineArea=null。 File 英雄榜=new File()。 Hashtable hashtable=null。 ShowRecord showHeroRecord=null。 MineGame(){ mineArea=new MineArea(16,16,40,1)。 add(mineArea,)。 bar=new JMenuBar()。 fileMenu=new JMenu(游戲)。 初級=new JMenuItem(初級)。 中級=new JMenuItem(中級)。 高級=new JMenuItem(高級)。 掃雷英雄榜=new JMenuItem(掃雷英雄榜)。 (初級)。 (中級)。 (高級)。 (掃雷英雄榜)。 (fileMenu)。 setJMenuBar(bar)。 (this)。 (this)。 (this)。 (this)。 hashtable=new Hashtable()。 (初級,初級+999+匿名)。 (中級,中級+999+匿名)。 (高級,高級+999+匿名)。 if(!()) { try{ FileOutputStream out=new FileOutputStream(英雄榜)。 ObjectOutputStream objectOut=new ObjectOutputStream(out)。 (hashtable)。 ()。 ()。 } catch(IOException e){} } showHeroRecord=new ShowRecord(this,hashtable)。 setBounds(100,100,280,380)。 setVisible(true)。 setDefaultCloseOperation()。 validate()。 } public void actionPerformed(ActionEvent e){ if(()==初級){ (8,8,10,1)。 setBounds(100,100,200,280)。 } if(()==中級){ (16,16,40,2)。 setBounds(100,100,280,380)。 } if(()==高級){ (22,22,99,3)。 setBounds(100,100,350,390)。 } if(()==掃雷英雄榜){ if(showHeroRecord!=null) (true)。 } validate()。 } public static void main(String args[]){ new MineGame()。 }}import .*。import .*。import .*。public class MineArea extends JPanel implements ActionListener,MouseListener{ JButton reStart。 Block [][] block。 BlockView [][] blockView。 LayMines lay。 int row,colum,mineCount,markMount。//雷區(qū)的行數(shù)、列數(shù)以及地雷個數(shù)和用戶給出的標(biāo)記數(shù) ImageIcon mark。 int grade。 JPanel pCenter,pNorth。 JTextField showTime,showMarkedMineCount。 //顯示用時以及標(biāo)記數(shù) Timer time。 //計時器 int spendTime=0。 Record record。 public MineArea(int row,int colum,int mineCount,int grade) { reStart=new JButton(重新開始)。 mark=new ImageIcon()。 //探雷標(biāo)記 time=new Timer(1000,this)。 showTime=new JTextField(5)。 showMarkedMineCount=new JTextField(5)。 ()。 ()。 (new Font(Arial,16))。 (new Font(Arial,16))。 pCenter=new JPanel()。 pNorth=new JPanel()。 lay=new LayMines()。 initMineArea(row,colum,mineCount,grade)。 //初始化雷區(qū),見下面的LayMines() (this)。 (showMarkedMineCount)。 (reStart)。 (showTime)。 setLayout(new BorderLayout())。 add(pNorth,)。 add(pCenter,)。 } public void initMineArea(int row,int colum,int mineCount,int grade){ ()。 spendTime=0。 markMount=mineCount。 =row。 =colum。 =mineCount。 =grade。 block=new Block[row][colum]。 for(int i=0。irow。i++){ for(int j=0。jcolum。j++) block[i][j]=new Block()。 } (block,mineCount)。 blockView=new BlockView[row][colum]。 (new GridLayout(row,colum))。 for(int i=0。irow。i++) { for(int j=0。jcolum。j++) { blockView[i][j]=new BlockView()。 blockView[i][j].giveView(block[i][j])。 //給block[i][j]提供視圖 (blockView[i][j])。 blockView[i][j].getBlockCover().addActionListener(this)。 blockView[i][j].getBlockCover().addMouseListener(this)。 blockView[i][j].seeBlockCover()。 blockView[i][j].getBlockCover().setEnabled(true)。
點擊復(fù)制文檔內(nèi)容
法律信息相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1