天地之灵学习小组
我们学习小组的OpenGL学习笔记 大家一定要互相折磨呀~~
posts - 150,  comments - 156,  trackbacks - 0
      英语老师:你这语法也太糟糕了吧。
      某帅男:报告~这是程序。
      来,开始敲~
      
#include<gl/glut.h>
#include
<stdio.h>
#include
<stdlib.h>
#include
<ctime>

static int LENGTH=20;
enum Color
{
BLACK,RED,GREEN,YELLOW
}
enum ConnectState
{
Not_Connected,Left_Connected,Right_Connected,Up_Connected,Down_Connected
}
enum GridState
{
EMPTY,CAPSULE,WARM
}
enum MarionState
{
WATE,ACT
}

class Diamonds
{
private:
    
int x,y;
    
int color;
    
int ConnectState;
public:
    
int getx()
    {
    
return x;
    }    
    
int gety()
    {
    
return y;
    }
    
int getColor()
    {
    color
=rand(RED,GREEN,YELLOW);
    
return color;
    }
    
int getConnectState()
    {
    
return ConnectState;
    }
};
class Warm
{
private:
    
int x,y;
    
int color=rand(RED,GREEN,YELLOW);
public:
    
int getx()
    {
    
return x;
    }
    
int gety()
    {    
    
return y;
    }
    
int getColor()
    {
    
return color;
    }
};
class Bottle   //Bottle 类没想明白呢,只知道开一个二围数组,每个里面都放上小色块。
{
    
private:
    
public:
};
int CapsuleMade()   //胶囊就是这样拼起来的,初始化了一下,但是感觉缺一些东西
{
Diamonds Capsule[
2];
Capsule[
0].x=Capsule[1].x-LENGTH;
Capsule[
0].ConnectState=Right_Connected;
Capsule[
1].ConnectState=Left_Connected;

}

今天的脑细胞已经耗完了,等明天补充吧~~

FeedBack:
# re: 10月20日_报告~这是程序_By 筱筱殿下
2008-10-20 21:05 | 肖赫_王婷婷_王冠_郑燚_孙婷
瓦卡卡,筱筱殿下也开始写程序了。这个世界越来越疯狂了,赞一个先  回复  更多评论
  
# re: 10月20日_报告~这是程序_By 筱筱殿下
2008-10-20 21:16 | 肖赫_王婷婷_王冠_郑燚_孙婷
俺校内上也贴了篇~~哈哈哈哈。欢迎观摩~~  回复  更多评论
  

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理



<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

常用链接

留言簿(6)

随笔分类(149)

随笔档案(150)

同道中人

搜索

  •  

积分与排名

  • 积分 - 43809
  • 排名 - 486

最新随笔

最新评论

阅读排行榜

评论排行榜