-
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
-
9454 digital display AC voltage process can be done with AC voltage Table
9454数码管显示交流电压程序,可以做交流电压表用-9454 digital display AC voltage process can be done with AC voltage Table
- 2023-03-15 09:25:03下载
- 积分:1
-
AT89C51 through the serial port communication, able to read the series of digita...
通过AT89C51的串行口通讯,能够读取Escort_95系列的数字式表头的电压和电流等信号.-AT89C51 through the serial port communication, able to read the series of digital Escort_95 table headers, such as voltage and current signals.
- 2022-02-21 15:44:47下载
- 积分:1
-
晶振采用6M,P1口为数码管段输出口,P3.0~P3.2为数码管位输出口,P3.5超声波发送输出,P3.7超声波接收。...
晶振采用6M,P1口为数码管段输出口,P3.0~P3.2为数码管位输出口,P3.5超声波发送输出,P3.7超声波接收。
- 2022-01-28 20:43:29下载
- 积分:1
-
MSP430F135的TA操作代码,绝对的真实可行.放心下载
MSP430F135的TA操作代码,绝对的真实可行.放心下载-MSP430F135 the TA operation code, is absolutely true feasible. Rest assured Download
- 2022-03-01 06:46:42下载
- 积分:1
-
PCI1730 input routine
PCI1730输入程序
- 2023-03-12 16:30:04下载
- 积分:1
-
dac7512, mcp3204 application dac7512, mcp3204 Application
dac7512,mcp3204应用 -dac7512, mcp3204 application dac7512, mcp3204 Application
- 2023-08-26 21:20:04下载
- 积分:1
-
using 4bit MCU winbond w921c400 and 840 to achive 10 channel CT0 cordless phone
using 4bit MCU winbond w921c400 and 840 to achive 10 channel CT0 cordless phone-using 4bit MCU winbond w921c400 and 840 to a chive CT0 10 channel cordless phone
- 2023-08-02 17:50:03下载
- 积分:1
-
IC卡购电软件实现,可以参考代码的源程序
IC卡购电软件实现,可以参考代码的源程序-IC card software realize the purchase of electricity, you can reference the source code
- 2022-08-03 11:19:13下载
- 积分:1
-
这是用汇编语言开发的一种输入方法,简单灵活,词库多,已经在使用,但词库灵活程度还有待开发。...
这是用汇编语言开发的一种输入方法,简单灵活,词库多,已经在使用,但词库灵活程度还有待开发。-This is the development of assembly language with an input method, simple, flexible, thesaurus, and already in use, but also the flexibility of the thesaurus to be developed.
- 2022-01-25 20:38:20下载
- 积分:1