-
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 know C++ souce program quckily
it can help you know C++ souce program quckily
- 2023-02-19 23:40:03下载
- 积分:1
-
选了一部分比较有代表性的汇编实验题目,都是自己亲手调过的,很有参考价值...
选了一部分比较有代表性的汇编实验题目,都是自己亲手调过的,很有参考价值-More representative selection a part of a compilation of experimental subjects, are transferred off his hand, of great reference value to
- 2022-05-30 03:11:39下载
- 积分:1
-
The use of four known control points and its corresponding image point coordinat...
利用四个已知控制点及其对应像点坐标解求六个外方位元素(即空间后方交会) (2009-04-24, Visual动态输入控制点个数,比例尺以及焦距和各个控制点的像点坐标和地面点坐标,确定航片的6个外方位元素-The use of four known control points and its corresponding image point coordinates solution seeking six elements of exterior orientation (ie, space resection) (2009-04-24, Visual Dynamic Input control points number, scale, and the focal length and the various control points, as point coordinates and ground point coordinates to determine the aerial photograph of the six exterior orientation elements
- 2022-11-17 14:25:03下载
- 积分:1
-
Simple encryption algorithm for data encryption, the algorithm is relatively sim...
简单加密算法,用于传输数据的加密,算法比较简单-Simple encryption algorithm for data encryption, the algorithm is relatively simple
- 2023-08-12 19:00:03下载
- 积分:1
-
80888的bios源码,是好东西,看看吧!
80888的bios源码,是好东西,看看吧!-8088 bios source code,good things.let s look at it.
- 2022-05-18 01:26:31下载
- 积分:1
-
The use of the temperature of the outside world ds18b20 collection led to the us...
利用ds18b20对外界的温度进行采集,利用led进行温度的实时显示-The use of the temperature of the outside world ds18b20 collection led to the use of real-time display of temperature
- 2022-07-24 04:20:33下载
- 积分:1
-
Based on MCU
基于单片机控制的电子密码锁
摘要:本系统由单片机系统、矩阵键盘、LED显示和报警系统组成。系统能完成开锁、超时报警、超次锁定、管理员解密、修改用户密码基本的密码锁的功能。除上述基本的密码锁功能外,还具有调电存储、声光提示等功能,依据实际的情况还可以添加遥控功
-Based on MCU-controlled electronic code locks Abstract: This system consists of single-chip microcomputer system, matrix keyboard, LED display and alarm system. System to complete the unlock, overtime alarm, lock超次, administrators decrypt, modify the user s password locks the basic functions. In addition to the above basic code lock function, but also has a transfer electric storage, sound and light features such as tips, according to the actual situation can also add a remote control reactive
- 2022-03-21 00:21:25下载
- 积分:1
-
vb 分形树
Dim xs As Integer
Dim ys As Integer
Dim alph As Single
Dim lng As Single
Dim m As Integer
Const PI As Single = 3.14159265
Private Function tree(x As Integer, y As Integer, angle As Single, length As Single, n As Integer)
Dim x0 As Integer
Dim y0 As Integer
Dim alpha As Single
Dim beita As Single
Dim leng As Single
BackColor = vbWhite
If n > 0 Then
x0 = x + Cos(angle) * length
y0 = y - Sin(angle) * length
picture1.Line (x, y)-(x0, y0), vbbrake
alpha = angle - PI / 8
beita = angle + PI / 8
leng = 2 * length / 3
Call tree(x0, y0, alpha, leng, n - 1)
&nbs
- 2022-01-24 19:06:52下载
- 积分:1
-
显示石英钟表,用汇编语言写的,也挺简单,初学者比较适合...
显示石英钟表,用汇编语言写的,也挺简单,初学者比较适合-Show quartz sheet, written in assembly language, but also quite simple and more suitable for beginners
- 2023-04-11 02:00:03下载
- 积分:1