-
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
-
main-game
用Pascal编的一款射击小游戏;a左移;d右移;j攻击;而且游戏界面会有提示
自己是红色的,绿色的是敌人。(Pascal series with a shooting game a left right d J attack and the game interface will prompt
You are red, green is the enemy. )
- 2016-08-13 20:18:38下载
- 积分:1
-
Impact
impact.js 游戏引擎的完整源码,可以作为学习之用(The complete source code of the impact.js game engine can be used as a study)
- 2018-03-03 15:55:49下载
- 积分:1
-
游戏 五子棋
说明: 遊戲 五子棋
先执行 npm install 安装依赖。然后有如下命令可用:
npm test 运行单元测试
npm run js 编译JS
npm run less 编译less
npm run watch 进入watch模式 自动编译文件(Game Gobang
Execute NPM install installation dependencies first. Then there are the following commands available:
NPM test runs unit tests
NPM run JS compiles JS
NPM run less compiled less
NPM run watch enters watch mode to compile files automatically)
- 2020-06-19 08:20:02下载
- 积分:1
-
Solitaire-master
java 小游戏
蜘蛛纸牌游戏
毕业设计
功能强大(little game wrote in java)
- 2018-05-02 20:09:39下载
- 积分:1
-
snake
一个简单的动画游戏 可以用鼠标控制运动方向(a simple playgame)
- 2012-11-28 18:01:25下载
- 积分:1
-
基于window8的打地鼠游戏
基于window8系统+VS2012的“打地鼠”游戏,使用C#语言编写,游戏界面精美,有一定借鉴学习的价值。
- 2023-02-14 01:20:03下载
- 积分:1
-
chess
chess game developed by java ... enjoy
- 2011-05-28 01:44:12下载
- 积分:1
-
six2
6子祺人人对战游戏,简单的控制台程序,电脑判别胜负。(6 sub-Kee all Battle games, simple console program, the computer determine the outcome.)
- 2014-05-11 16:30:55下载
- 积分:1
-
2004031211123811497
台湾人写的五子棋源码,很早以前收集的,看了几天才懂!(Taiwanese wrote renju source, the collection of long ago, after reading a few days can understand!)
- 2016-04-21 19:35:43下载
- 积分:1