diff --git a/main.cpp b/main.cpp index e5bc10f..744fd99 100644 --- a/main.cpp +++ b/main.cpp @@ -451,7 +451,7 @@ int game(){ clock_t start_t,this_t,start; start_t=clock(); start=start_t; - int posX[100],posY[100],fruitX,fruitY,snakeLength=2,ft=0,bombX[100],bombY[100],bombAmount=3,bombLoop=1; + int posX[101],posY[101],fruitX,fruitY,snakeLength=2,ft=0,bombX[100],bombY[100],bombAmount=3,bombLoop=1; int tempX[2],tempY[2]; bool bombShown[100]; double thistimeMillisec; @@ -465,7 +465,7 @@ int game(){ init_pair(1,COLOR_WHITE, COLOR_BLACK); wbkgd(stdscr, COLOR_PAIR(1)); printf("\e[?25l");//ปิดcursor - for(int i=0;i<100;i++){ + for(int i=0;i<101;i++){ posX[i]=-1; posY[i]=-1; }