c语言代码常用的英文,俄罗斯C语言经典代码(国外英文资料).doc

俄罗斯C语言经典代码(国外英文资料)

俄罗斯C语言经典代码(国外英文资料)

# include < DOS. H >

# include < conio. H >

# include < graphics. H >

# include < stdlib. H >

# ifdef __cplusplus

# define __CPPARGS...

# the else

# define __CPPARGS

# endif

# define MINBOXSIZE 20 / * the size of the smallest square * /

# define BGCOLOR 6 / * background color * /

# define GX 200

# define 10 GY

The # define SJNUM 10000 / * whenever a player hits 10,000 levels plus one

/ * key code * /

# define VK_LEFT 0x4b00

# define VK_RIGHT 0 x4d00

Pound sign define VK_DOWN 0x5000

Pound sign define VK_UP 0x4800

Pound sign define VK_HOME 0x4700

# define VK_END 0x4f00

# define VK_SPACE 0 x3920

Pound sign define VK_ESC 0x011b

# define VK_ENTER 0 x1c0d

/ * define the direction of tetris (I define him 4) * /

# define F_DONG 0

# define F_NAN 1

# define F_XI 2

# define F_BEI 3

# define NEXTCOL 20 / * the vertical coordinate of the next block. * /

# define NEXTROW 12 / * the cross of the next block is from the standard * /

# define MAXROW 14 / * game screen size * /

# define MAXCOL 20

# define SCCOL 50 / * the relative position of the large screen of a game screen

# define SCROW 30

# define X_Z 0 / * defines the square of the block (eight kinds) * /

# define X_REZ 1

# define X_7 2

# define X_RE7 3

# define X_I 4

# define X_REI 5

# define X_TIAN 6

# define X_T 7

Int gril [22]. / * game screen coordinates * /

Int col = 1, row = 7; / * the horizontal axis of the current block * /

Int boxfx = 0, boxgs = 0; / * the shape and direction of the temple block

Int nextboxfx nextboxgs, maxcol = 22; / * the shape and direction of the next square

Int minboxcolor nextminboxcolor;

Int num = 0; / the game is divided by

Int DJ = 0, gamedj [10] = {18, 16, 16, 14, 12, 6, 4, 2, 1}; / * game class * /

Struct all {

Int x, y;

Int fangxiang;

Int gesu.

};

/ * the following USES a 3-dimensional array to record the initial shape and direction of the square

Int boxstr [8] [4] [4] = {{{{{

{0, 0, 0, 0,

{0, 0, 0, 0,

{0, 1, 1, 0},

{0, 0, 1, 1},

{

{0, 0, 0, 0,

{0, 0, 0, 0,

{0, 0, 1, 1},

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值