-
C语言写的俄罗斯方块程序
其中的主要逻辑有:
(1)由于c的随机性函数不好,所以每次游戏开始根据bios时间设置种子。
(2)得分越高,方块下降速度
C语言写的俄罗斯方块程序
其中的主要逻辑有:
(1)由于c的随机性函数不好,所以每次游戏开始根据bios时间设置种子。
(2)得分越高,方块下降速度越快(每200分为单位)。
(3)每下落一个方块加1分,每消除一行加10分,两行加30分,三行加70分,四行加150分。初试分数为100分。
游戏控制:
up-旋转;空格-下落到底; 左右下方向键-控制方向。P-开始或暂停游戏。 ESC-退出。
特点:
(1)由于tc不支持中文,所以基本都是英文注释。
(2)函数命名尽可能规范的表达其内部处理目的和过程。
(3)代码加上注释仅有577行。(我下载过的两个俄罗斯方块代码一个在1087行,一个在993行,我的比它们代码少)。
(4)除了消除空格时算法比较复杂,其他算法都比较简单易读。
(5)绘图效率和局部代码效率扔有待提高。
(6)FrameTime参数可能依据不同硬件环境进行具体设置,InitGame需要正确的TC路径。
-err
- 2023-05-30 22:10:03下载
- 积分:1
-
it can help you use C++ program we
it can help you use C++ program we
- 2022-05-12 18:46:21下载
- 积分:1
-
HT46R47,HT46R22,
HT46R23,HT46R24
A/D 型单片机
中文资料...
HT46R47,HT46R22,
HT46R23,HT46R24
A/D 型单片机
中文资料
- HT46R47,HT46R22,
HT46R23,HT46R24
- 2022-02-22 00:29:42下载
- 积分:1
-
汇编多媒体教案ppt格式,不错哦!
汇编多媒体教案ppt格式,不错哦!-compilation of multimedia lesson plans ppt format, it is true!
- 2022-01-25 15:42:15下载
- 积分:1
-
很好的资料 很好的资料 很好的资料
很好的资料 很好的资料 很好的资料 -good goodgoodgoodgoodgood
- 2022-03-23 21:50:25下载
- 积分:1
-
在屏幕上开出三个窗口:起止坐标为(5,10)和(15,30),(5,50)和(15,70),(18,15)和(22,65)。要求可用左右方向键选择左窗口或右窗口
在屏幕上开出三个窗口:起止坐标为(5,10)和(15,30),(5,50)和(15,70),(18,15)和(22,65)。要求可用左右方向键选择左窗口或右窗口为当前活动窗口。当一行字符显示满后(左右窗口一行显示20个字符,下窗口显示50个字符),窗口自动向上卷动一行,输入的字符仍显示与最低一行,窗口最高一行向上卷动后消失。用上下方向键可使活动窗口及下窗口内容同时上卷或下卷。输入‘ESC’后结束程序。(huangyujie)-screen out three windows : starting and ending coordinates (5,10) and (15, 30), (5,50) and (15.70) (18.15) and (22.65). Asked about the direction keys can be used to choose the left or right window to window to window current activities. When his characters show after the expiration of (his show window about 20 characters, the next window displays 50 characters), the window automatically scrolling upward here, the importation of characters showed that the minimum here, his highest window scrolling upward disappeared. Up and down direction keys enable activities under the window and window content, but on the next volume or volumes. Importation "ESC" end after the procedure. (Huangyujie)
- 2022-07-13 02:20:18下载
- 积分:1
-
8051 - Understanding Stack operation
MOV SP,#35H;更改堆栈指针内存位置
- 2022-01-28 00:05:26下载
- 积分:1
-
关于用电子时钟的编程设计,对课程设计有重要用处
关于用电子时钟的编程设计,对课程设计有重要用处-electronic clock on the program design, the design of the curriculum is important useless!
- 2023-09-07 12:05:04下载
- 积分:1
-
所谓图像匹配,就是指图像之间的比较、得到不同图像之间的相似度。基于数字图像,编写对两副数字图像进行匹配的算法及演示程序。...
所谓图像匹配,就是指图像之间的比较、得到不同图像之间的相似度。基于数字图像,编写对两副数字图像进行匹配的算法及演示程序。-stereo matching
- 2023-06-13 12:45:03下载
- 积分:1
-
除湿机的说明程序文件 已经生产几十W台 出口机形 分时操作
除湿机的说明程序文件 已经生产几十W台 出口机形 分时操作-dehumidifiers of the document production process dozens of W-exporting machine time-sharing operation
- 2022-06-18 05:13:50下载
- 积分:1