#include #include #include #include using namespace std; bool gameOver; const int width = 40; const int height = 40; int x, y, fruitX, fruitY, score; enum eDirection { STOP = 0, LEFT, RIGHT, UP, DOWN }; eDirection dir; void setup() { gameOver = false; dir = STOP; x = width / 2; y = height / 2; fruitX = rand() % width; fruitY = rand() % height; score = 0; } void draw() { system("cls"); for(int i = 0; i < width + 2; i++) cout << "#"; cout << "\n"; for(int i = 0; i < height; i++) { for(int j = 0; j < width; j++ ) { if(j == 0) cout << "#"; cout << " "; if(j == width - 1) cout << "#"; } cout << "\n"; } for(int i = 0; i < width + 2; i++) cout << "#"; cout << "\n"; } void input() { } void logic() { } int main() { setup(); while(!gameOver){ draw(); input(); logic(); } }