- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
JAVA网络版斗地主游戏
JAVA网络版斗地主游戏下面是写的项目分析和讲解:由于我装的eclipse没有装UML插件,所以就没有设计UML图,但是我的源码当中大部分有注解讲解。在此程序当中,我的主要抽象对象是牌这个对象Puker.java代码如下:/* * 这是一个牌对象的抽象类 * 是为了表现牌这个对象 * */import java.awt.*;public class Puker {public int P_x,P_y;//表示牌X,Y坐标的属性private final int P_w=60,P_h=80; //表示牌宽,高的属性public Puker_num puker_num=null; //表示牌的牌值的属性public Puker_hushe puker_hushe=null; //表示牌的花色的属性public String puker_n=null;//表示画牌时用到的一个属性public int puker_num1,puker_hushe1; //用整数形式表示牌的牌值和花色的属性public int puker_dx;//表示牌的大小的值public boolean bUp=false; //表示牌是否被选中的属性/* * 用于构造用户自己的牌的构造方法 * */public Puker(int P_x,int P_y,Puker_num puker_num,Puker_hushe puker_hushe){this.P_x=P_x;this.P_y=P_y;this.puker_num=puker_num;this.puker_hushe=puker_hushe;this.BPuker_num();}/* * 用于构造54张牌组的构造方法 * */public Puker(int puker_num1,int puker_hushe1){this.puker_num1=puker_num1;this.puker_hushe1=puker_hushe1;}/* *用于画牌这个对象的方法 * */public void paint(Graphics g){Color c=g.getColor();g.setColor(Color.WHITE);g.fill3DRect(this.P_x, this.P_y, this.P_w, this.P_h, true);g.setColor(Color.BLACK);g.draw3DRect(this.P_x, this.P_y, this.P_w, this.P_h, true);g.drawString(this.puker_n, this.P_x+5, this.P_y+20);if(this.puker_n.equals(大王)||this.puker_n.equals(小王)){}else g.drawString(this.puker_hushe.toString(), this.P_x+20, this.P_y+20);g.setColor(c);}/* * 此方法根据构造方法当中的属性来 * 决定牌的其他属性 * */public void BPuker_num (){switch(puker_num){case p1: this.puker_n=1;this.puker_dx=14;this.puker_num1=1; break;case p2: this.puker_n=2;this.puker_dx=15;this.puker_num1=2;break;case p3: this.puker_n=3;this.puker_dx=3;this.puker_num1=3; break;case p4: this.puker_n=4;this.puker_dx=4;this.puker_num1=4;break;case p5: this.puker_n=5;this.puker_dx=5;this.puker_num1=5;break;case p6: this.puker_n=6;this.puker_dx=6;this.puker_num1=6;break;case p7: this.puker_n=7;this.puker_dx=7;this.puker_num1=7;break;case p8: this.puker_n=8;this.puker_dx=8;this.puker_num1=8;break;case p9: this.puker_n=9;this.puker_dx=9;this.puker_num1=9;break;case p0: this.puker_n=10;this.puker_dx=10;this.puker_num1=10;break
您可能关注的文档
最近下载
- 小学音乐实践性教学的思考与探索.doc VIP
- 生物科学史在高中生物教学中的创新应用研究教学研究课题报告.docx
- 2024秋五年级英语上册 Module 6 Unit 2 He ran very fast教学设计1 外研版(三起).docx VIP
- 《新闻心理学》课件(全).pptx VIP
- 人大版《精算模型(第3版)》习题解答.pdf VIP
- 基于图像识别和智能分析在火电厂两外管理及反违章管理中的应用技术方案-2021.4.20.docx VIP
- 高职院校开展建筑业农村劳动力转移培训的策略.pdf VIP
- 任务19 谷物中镉的测定.pptx VIP
- 汽车以租代购合同完整版.doc VIP
- 任务17 粮食中粗纤维素的测定.pptx VIP
文档评论(0)