-
2.3
一个简单的猜数游戏程序:
利用Math.random()方法生成0-1之间的double型数dNum,将dNum转换为0-100之间的整数iNum。
利用KeyInput.readInt()方法接收键盘输入的整数inNum。如果inNum小于iNum,在屏幕上显示“输入的值小,请输入更大的数.”;如果inNum大于iNum,在屏幕上显示“输入的值大,请输入更小的数.”;如果inNum等于iNum,在屏幕上显示“猜对了.”,并结束运行。
猜测错误的时候,重新输入inNum,直到猜对为止。如果猜测10次后仍未猜对,显示“猜测次数已达10次,猜数失败.”,并结束程序的运行。
(A simple guessing game program: use Math.random () method to generate double-type numbers between 0-1 dNum, will dNum into an integer between 0-100 iNum. use KeyInput.readInt () method receives the keyboard input integer inNum. If inNum less than iNum, the screen " Enter the value of the small, enter the greater number." If inNum than iNum, the screen " Enter the value of the large number of smaller type." If inNum equal iNum, displayed on the screen, " guessed." and end the run. guess wrong, re-enter inNum, until you guess it right up. If the guess was right 10 times not to show " guess the number has reached 10 times, guess the number of failures." And end the program.)
- 2010-11-03 14:29:09下载
- 积分:1
-
跳棋程序
你喜欢玩这种棋盘的跳棋吗?这里实现了一款经典的跳棋游戏,一起来玩吧!当然这个作为游戏课设的设计也是完全可以的。游戏算法是按照经典跳棋的游戏规则,而跳棋的游戏规则很简单:棋子的移动可以一步步在有直线连接的相邻六个方向进行,如果相邻位置上 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
- 2023-04-28 03:40:04下载
- 积分:1
-
concealment
Concealment_Space Engineers
- 2018-11-03 11:08:50下载
- 积分:1
-
C#双人五子棋小游戏源代码 实例下载
C#双人五子棋小游戏源代码(完整版) 仅供学习交流使用,请勿用于商业用途
- 2013-01-09下载
- 积分:1
-
matchman
火柴人对打游戏的文件配置,说明,源代码等等,内容非常丰富啊(Matches people fighting game configuration files, description, source code, etc., the content is very rich ah)
- 2007-09-17 21:11:43下载
- 积分:1
-
five_chess
五子棋实现,python实现的五子棋人工智能。(Python implementation of Gobang artificial intelligence)
- 2018-06-11 19:26:38下载
- 积分:1
-
石器时代8.0服务器端源码
CSA(石器)的整套源码...部分功能需要自行开放,源码完整可编译...一直珍藏的东西..希望大家拿去多多学习-CSA (stone) ... part of the package source feature requires its own open-source can compile a complete collection of things have been ... .. hope that everyone take a lot to learn
- 2022-08-07 23:40:35下载
- 积分:1
-
as3.0翻牌
ActionScript3.0写的翻牌游戏(Reversal game written by ActionScript 3.0)
- 2020-06-20 20:00:02下载
- 积分:1
-
ysttlebpenetrationbfirewall
可以用这个代码实现防火墙穿透,真是太牛了(Can use this code implements firewall penetration, is really too cattle)
- 2017-04-15 22:15:05下载
- 积分:1
-
AngryBirds-final
cocoa2D做的愤怒的小鸟,包括数据的存储和处理(Cocoa2D to do the angry birds, including data storage and processing.)
- 2014-10-15 13:41:19下载
- 积分:1