| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 4321 人关注过本帖
标题:sdk写的俄罗斯方块
只看楼主 加入收藏
新浪
Rank: 3Rank: 3
来 自:水星
等 级:论坛游侠
威 望:1
帖 子:770
专家分:167
注 册:2008-6-10
收藏
得分:0 
不错  应该加精
2008-06-11 20:53
lingluoz
Rank: 2
来 自:苏州科技学院
等 级:新手上路
威 望:4
帖 子:749
专家分:0
注 册:2008-2-2
收藏
得分:0 
哦。对了想起来飞燕姐还出了一个彩色代码的程序。。失误。失误。。

Murphy's Law :
If there are two or more ways to do something, and one of those ways can result in a catastrophe, then someone will do it.
2008-06-11 23:04
lingluoz
Rank: 2
来 自:苏州科技学院
等 级:新手上路
威 望:4
帖 子:749
专家分:0
注 册:2008-2-2
收藏
得分:0 
怎么没有人帮我顶啊。。太伤心了。自己帮自己顶一下

Murphy's Law :
If there are two or more ways to do something, and one of those ways can result in a catastrophe, then someone will do it.
2008-06-12 22:23
VxWorks
Rank: 3Rank: 3
来 自:WindRiver
等 级:论坛游民
威 望:6
帖 子:859
专家分:68
注 册:2007-11-24
收藏
得分:0 
我给你顶,还用fish给你着色
ti.h
#define _ln 24
#define _col 16
#define _px_per_block 8

#ifndef _null
#define _null (void *)0
#endif

extern
int  get_matrix_block(char ln,char col);
extern void step();
extern void move_left();
extern void move_right();
extern void init();
extern void rotate();
extern void new_block();
extern void drop();


/*blocks

0  1  2  3  4  5     6   7   8    9 10

x  xx x   x x  xxxxx  xx xx   x   x xxx
x  xx xx xx xx       xx   xx xxx xx  x
x      x x  x                     x
x
x
*/


const char _block[11][5][5]={

    {
        {0,0,1,0,0},
        {0,0,1,0,0},
        {0,0,1,0,0},
        {0,0,1,0,0},
        {0,0,1,0,0}
    },

    {
        {0,0,0,0,0},
        {0,0,0,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,0},
        {0,0,1,0,0},
        {0,0,1,1,0},
        {0,0,0,1,0}
    },

    {
        {0,0,0,0,0},
        {0,0,0,0,0},
        {0,0,0,1,0},
        {0,0,1,1,0},
        {0,0,1,0,0}
    },

    {
        {0,0,0,0,0},
        {0,0,0,0,0},
        {0,0,1,0,0},
        {0,0,1,1,0},
        {0,0,1,0,0}
    },

    {
        {0,0,0,0,0},
        {0,0,0,0,0},
        {1,1,1,1,1},
        {0,0,0,0,0},
        {0,0,0,0,0}
    },

    {
        {0,0,0,0,0},
        {0,0,0,0,0},
        {0,0,0,0,0},
        {0,0,1,1,0},
        {0,1,1,0,0}
    },

    {
        {0,0,0,0,0},
        {0,0,0,0,0},
        {0,0,0,0,0},
        {0,1,1,0,0},
        {0,0,1,1,0}
    },

    {
        {0,0,0,0,0},
        {0,0,0,0,0},
        {0,0,0,0,0},
        {0,0,1,0,0},
        {0,1,1,1,0}
    },

    {
        {0,0,0,0,0},
        {0,0,0,0,0},
        {0,0,1,0,0},
        {0,1,1,0,0},
        {0,0,1,0,0}
    },

    {
        {0,0,0,0,0},
        {0,0,0,0,0},
        {0,0,0,0,0},
        {0,1,1,1,0},
        {0,0,1,0,0}
    }
};

为了防止世界被破坏,为了守护世界的和平,贯彻爱与真实的邪恶,可爱又迷人的反派角色,VxWorks!
Don't ask me any question.I'm just here to buy soy sauce.
2008-06-12 22:49
liyanhong
Rank: 3Rank: 3
来 自:水星
等 级:禁止访问
威 望:8
帖 子:1867
专家分:0
注 册:2008-5-3
收藏
得分:0 

跟我在同一档次上的朋友
学就要学这个  小程序没用

[[it] 本帖最后由 liyanhong 于 2008-6-13 00:31 编辑 [/it]]

爱上你 是 我的错  可是离 开  又舍不得  听着你为我写的歌     好难过
如果说 我说如果  我们还 能  重新来过   不去计 较 谁对谁错  会怎么做
2008-06-13 00:17
lingluoz
Rank: 2
来 自:苏州科技学院
等 级:新手上路
威 望:4
帖 子:749
专家分:0
注 册:2008-2-2
收藏
得分:0 
是的。小的程序写写一些问题还看不出来。。等到代码长了以后。才知道数据结构。。变量命名有多么重要了。。

Murphy's Law :
If there are two or more ways to do something, and one of those ways can result in a catastrophe, then someone will do it.
2008-06-13 07:59
lingluoz
Rank: 2
来 自:苏州科技学院
等 级:新手上路
威 望:4
帖 子:749
专家分:0
注 册:2008-2-2
收藏
得分:0 
自己再帮自己顶一下

Murphy's Law :
If there are two or more ways to do something, and one of those ways can result in a catastrophe, then someone will do it.
2008-06-14 14:28
jerrychn
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-9-3
收藏
得分:0 
fuck,laji.
2008-09-03 16:26
wanghepeng10
Rank: 1
等 级:新手上路
帖 子:41
专家分:0
注 册:2008-5-7
收藏
得分:0 
我是新来的
代码不错,
2008-09-04 08:21
ronalwei9
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-5-14
收藏
得分:0 
GGGGGGGGGGGGGGG
GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
2008-11-20 13:28
快速回复:sdk写的俄罗斯方块
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017767 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved