-
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
-
一款非常小的液晶显示屏,适合于便携式设备使用。
一款非常小的液晶显示屏,适合于便携式设备使用。-A very small LCD screen, suitable for use in portable devices.
- 2022-02-04 23:02:46下载
- 积分:1
-
,片选接到p1.5
复位端 p1.4
中断端接到 int0
82c250工作在斜率模式下 ,RS 接51k电阻到地。
2,SJA10...
,片选接到p1.5
复位端 p1.4
中断端接到 int0
82c250工作在斜率模式下 ,RS 接51k电阻到地。
2,SJA1000与82C250的接口,逻辑上为SJA1000输出0(显性位),表现为低点平输出给82C250,则82C250输出
差分的低电平。SJA1000输出1(隐性位),表现为高电平或悬空输出给82C250,则82C250输出悬空状态。
3,周立功的中SJA_BCANCONF.ASM中对输出控制寄存器 的TX0的输出 极性的位的定义不对。
还有里面定义有接收错误标志码,不知道何时用。-, The election received a P1.5-chip client p1.4 interrupt reset int0 82c250 client received in the slope mode, RS then 51k resistor to ground. 2, SJA1000 with the 82C250 interface, logic for SJA1000 Output 0 (dominant bit), showing low level output to the 82C250, while the low-level differential output 82C250. SJA1000 Output 1 (recessive), and the performance of the output is high or left vacant to the 82C250, the vacant state 82C250 output. 3, Zhou Ligong in the SJA_BCANCONF.ASM of output control register TX0 output polarity bit the definition of wrong. Inside the definition also has to receive error flag code, I do not know when to use.
- 2022-06-28 07:07:40下载
- 积分:1
-
汇编语言 封装的输入输出函数 可以直接调用
汇编语言 封装的输入输出函数 可以直接调用-Assembly language package input and output functions can be directly invoked
- 2022-03-18 10:25:34下载
- 积分:1
-
PC机的串口收发软件 !!!C语言 PC机的串口收发软件 !!!C语言...
PC机的串口收发软件 !!!C语言 PC机的串口收发软件 !!!C语言-PC serial port transceiver software! ! ! C language PC serial port transceiver software! ! ! C language PC serial port transceiver software! ! ! C Language
- 2022-04-08 15:51:31下载
- 积分:1
-
EMC 78P156 控制蓝牙芯片,实现车载蓝牙电话通讯.
EMC 78P156 控制蓝牙芯片,实现车载蓝牙电话通讯.-EMC 78P156 control of Bluetooth chips, realize Car Bluetooth telephone communications.
- 2022-07-07 20:55:40下载
- 积分:1
-
微波炉的代码说明 LCD显示 生产机型 名厂定制
微波炉的代码说明 LCD显示 生产机型 名厂定制-microwave ovens code shows LCD production aircraft manufacturers Customization
- 2022-06-27 13:46:05下载
- 积分:1
-
学习C51时写的RS232通讯程序,提供给刚学单片机程序的朋友参考...
学习C51时写的RS232通讯程序,提供给刚学单片机程序的朋友参考-C51 when learning to write the RS232 communication procedures, available to just school friends Singlechip procedure reference
- 2023-05-09 14:20:03下载
- 积分:1
-
Do STC89C52 learning remote control, infrared remote control can keep eight of i...
STC89C52做的学习型遥控器,可存八个红外遥控信息,只要再把按键用定时器中断2完成就可以用于商业生产了-Do STC89C52 learning remote control, infrared remote control can keep eight of information, as long as the button and then use Timer 2 interrupt can be completed for commercial production of the
- 2022-02-09 12:04:42下载
- 积分:1
-
汇编操作蜂鸣器演奏音乐的例程,使用MASM6.15编译通过
汇编操作蜂鸣器演奏音乐的例程,使用MASM6.15编译通过-operation of buzzer
- 2022-02-15 05:23:26下载
- 积分:1