Witam niestety nie wiem jaki dać tytuł więc za to bardzo przepraszam. Chodzi o to że pisałem program wspomagając się poradnikiem. Na poradniku wszystko było dobrze i program się odpalał a mi właśnie nie chce. Daje poniżej cały kod i mam nadzieję na pomoc :D
#include <iostream>
using namespace std;
bool gameOver;
const int width = 20;
const int height = 20;
int x,y,OwoceX,OwoceY,Punkty;
enum eDirecton {Stop = 0,Lewo,Prawo,Gora,Dol};
eDirecton dir;
void Setup()
{
gameOver = false;
dir = Stop;
x = width / 2;
y = height / 2;
OwoceX = rand() % width;
OwoceY = rand() % height;
Punkty = 0;
}
void Draw()
{
system("cls");
for (int i = 0; <width; i++)
cout <<"#";
cout << endl;
for(int i = 0; i<height; i++)
{
for(int j = o; j <width; j++)
{
if (j==0)
cout<<"#";
else
cout<<" ";
if(j == width-1)
cout<<"#";
}
cout << endl;
}
for (int i = 0; <width; i++)
cout <<"#";
cout << endl;
}
void Input()
{
}
void Logic()
{
}
int main()
{
Setup();
while (!gameOver)
{
Draw();
Input();
Logic();
}
return 0;
}