欢迎来到天天文库
浏览记录
ID:12460820
大小:32.50 KB
页数:10页
时间:2018-07-17
《五子棋游戏毕业论文 五子棋游戏设计论文》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、五子棋游戏毕业论文五子棋游戏设计论文导读:就爱阅读网友为您分享以下“五子棋游戏设计论文”的资讯,希望对您有所帮助,感谢您对92to.com的支持!if(targetinstanceofActionListener)r.addActionListener((ActionListener)target);returnr;}publicvoidMapSize(intw,inth){setSize(w*20+50,h*20+100);10if(this.checkcomputer)this.iscomputer=true;elsethis.isc
2、omputer=false;mp.setModel(cm);mp.repaint();}publicbooleangetiscomputer(){returnthis.iscomputer;}publicvoid10restart(){intmodeChess=cm.getModeChess();if(modeChess<=3&&modeChess>=1){cm=newChessModel(modeChess);MapSize(cm.getWidth(),cm.getHeight());}else{System
3、.out.println("u81EAu5B9Au4E49");}}publicvoidactionPerformed(ActionEvente){Stringarg=e.getActionCommand();10try{if(arg.equals("Windows"))UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");elseif(arg.equals("
4、Motif"))UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");elseUIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");10SwingUtilities.updateComponentTreeUI(this);}catch(Exceptionee){}if(arg.equals("20x15&
5、quot;)){this.width=20;this.height=15;cm=newChessModel(1);MapSize(this.width,this.height);SwingUtilities.updateComponentTreeUI(this);}if(arg.equals("30x20")){this.width=30;10this.height=20;cm=newChessModel(2);MapSize(this.width,this.height);SwingUtilities.updateC
6、omponentTreeUI(this);}if(arg.equals("40x30")){this.width=40;this.height=30;cm=newChessModel(3);MapSize(this.width,this.height);SwingUtilities.updateComponentTreeUI(this);10}if(arg.equals("人机对弈")){this.checkcomputer=true;this.iscomputer=true;cm=newChess
7、Model(cm.getModeChess());MapSize(cm.getWidth(),cm.getHeight());SwingUtilities.updateComponentTreeUI(this);}if(arg.equals("人人对弈")){this.checkcomputer=false;this.iscomputer=false;cm=new10ChessModel(cm.getModeChess());MapSize(cm.getWidth(),cm.getHeight());SwingUtil
8、ities.updateComponentTreeUI(this);}if(arg.equals("开局")){restart();}if(arg.equals("
此文档下载收益归作者所有