|
Using namespace std; bool GameOver
|
tarix | 05.05.2023 | ölçüsü | 12,12 Kb. | | #126405 |
| ilon o\'yini codi
#include
using namespace std;
bool GameOver;
const int width = 20;
const int height = 10;
int x, y, fruitX, fruityY, score;
enum eDirection{stop = 0, RIGHT, LEFT, UP, DOWN };
eDirection dir;
void Setup()
{
GameOwer = false;
dir = STOP;
X= width / 2;
Y= height / 2;
fruitX =rand() % width;
fruitY =rand() % height;
score = 0;
}
Inlain void Draw()
{
system("cls");
for(int i=0; i<=width; i++) cout<<'#';
cout<for(int i=0; i<=heigft; i++)
{
for(int j=0; j<=width; j++)
{
if(j==0 || j== width - 1) cout<<'#';
cout<<' ';
}
cout<}
for(int i=0; i<=width; i++) cout<<'#';
cout<}
void Input()
{
}
void Logic()
{
}
int main() {
Setup()
while(!GameOver)
{
Draw():
Input();
Logic();
}
return 0;
}
Dostları ilə paylaş: |
|
|