- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
博饼小游戏(Bo game)
博饼小游戏(Bo game)
Xiamen Mid Autumn Festival program! (written in JAVA)
* Bo, this is a Applet program, requirements: the number of each prize records have been obtained, if something has run out, then points out the corresponding Bo not winning.
The end of the game is that the champion has been created and the prizes have run out. Follow each award process until the end of the game. At the end of the game, it prompts the user that the game is over and prompts the user to restart the game and start a new game.
After replication, save as.Java file, compile and then write a HTML file (attached to the 2 floor), save in the same directory
You can see the running interface when running appletviewer Cake.html! That cake rules attached on the 3 floor, thank you! If theres anything you dont understand, welcome to send text messages
Discuss together! * /
Import java.awt.*; / / Container, FlowLayout
Import java.awt.event.*; / / ActionEvent, ActionListener
Import javax.swing.*; / / JApplet, JButton, JLabel, JTextField
Public, class, Cake, extends, JApplet, implements, ActionListener {
/ / total number of dice points defined, fre on behalf of frequency
Int[] fre = new int[7]; / / the sacrifice of a space for readability
Int[] die = new int[7]; / / the dice points
Int Zhuangyuan = 0; / / statistics exam number
Int duitang = 0; / / the statistics on the number of.
Int Sanhong = 0; / / statistics three red number
Int Sijin = 0; / / the number of statistics four
Int Erju = 0; / / two for the number of Statistics
Int Yixiu = 0; / / statistics show a number of
String = result; / / output for the award-winning results
JLabel[] dieLabel = new JLabel[7];
JTextField[] dieField = new JTextField[7];
JButton rollButton;
Public, void, init () {
Container container = getContentPane ();
Container.setLayout (new, FlowLayout ());
Create label and text field for / / die 1
For (int = I = 1; idie.length; i++) {
DieLabel[i] = new, JLabel (Die, +i);
Container.add (dieLabel[i]);
DieField[i] = new JTextFi
您可能关注的文档
- 初中物理总复习是物理学习中的一个重要环节 target=_blank(The general review of physics in junior high school is an important part of physics learning target=_blank).doc
- 初中生数学学习的诊断与教学调控(Diagnosis and teaching adjustment of junior high school students' Mathematics Learning).doc
- 初中生汉字书写的现状与对策(Status and Countermeasures of Chinese characters writing in junior middle school students).doc
- 初中生需掌握的1600单词(Junior high school students need to master 1600 words).doc
- 初中生必背古诗文50首(Junior high school students must recite 50 Ancient Poems).doc
- 初中英语必考短语(Junior high school teaching English phrases).doc
- 初中英语语法大全(Grammar for junior high school English).doc
- 初中试卷命制基本技术介绍(Introduction of basic technique of junior high school papers).doc
- 初中语文教材存在的一些问题_4335(Some problems existing in Chinese textbooks for junior high school _4335).doc
- 初中语文课堂提问的逻辑视角_5049(The logical perspective of questioning in junior high school Chinese classroom _5049).doc
文档评论(0)