.
This commit is contained in:
parent
7d7582bf6a
commit
a3b2f27308
BIN
Snakes/snakes
BIN
Snakes/snakes
Binary file not shown.
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user