This commit is contained in:
fl3ka 2024-06-07 11:46:17 -05:00
parent 7d7582bf6a
commit a3b2f27308
2 changed files with 22 additions and 1 deletions

Binary file not shown.

View File

@ -1,3 +1,4 @@
#include <chrono>
#include <iostream>
#include <cstdlib>
#include <ncurses.h>
@ -30,6 +31,7 @@ void gover(){
box(win, 0, 0);
mvwprintw(win,10,35,"GAME OVER");
wrefresh(win);
this_thread::sleep_for(chrono::milliseconds(100));
wgetch(win);
endwin();
@ -70,6 +72,25 @@ void RenderField(){
}
void manu(){
initscr();
noecho();
curs_set(0);
win = newwin(height, width, 0, 0);
box(win,0,0);
mvwprintw(win, 1,17, ".d8888. d8b db .d8b. db dD d88888b .d8888. ");
mvwprintw(win, 2,17, "88' YP 888o 88 d8' `8b 88 ,8P' 88' 88' YP ");
mvwprintw(win, 3,17, "`8bo. 88V8o 88 88ooo88 88,8P 88ooooo `8bo. ");
mvwprintw(win, 4,17, " `Y8b. 88 V8o88 88~~~88 88`8b 88~~~~~ `Y8b. ");
mvwprintw(win, 5,17, "db 8D 88 V888 88 88 88 `88. 88. db 8D ");
mvwprintw(win, 6,17, "`8888Y' VP V8P YP YP YP YD Y88888P `8888Y' ");
mvwprintw(win,10, 35, "-Start Game-");
wrefresh(win);
wgetch(win);
endwin();
}
void GameUpdate(int &diff, int &fX, int &fY){
int prevX=TailX[0];
int prevY=TailY[0];
@ -137,7 +158,7 @@ int fX;
int fY;
int diff = 400;
start();
manu();
while(!gameover){
UserInput(tmpv);