英語老師:你這語法也太糟糕了吧。
某帥男:報告~這是程序。
來,開始敲~
#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;
}
今天的腦細胞已經耗完了,等明天補充吧~~
posted on 2008-10-20 20:44
正牌的天地之靈和他的徒兒們肖赫_王婷婷_王冠_鄭燚_孫婷 閱讀(126)
評論(2) 編輯 收藏 引用 所屬分類:
筱筱殿下