about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2020-01-09 23:26:28 +0100
committerManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2020-01-09 23:26:28 +0100
commit46b2b2a9210269b376044ee1d208d75c772cb34a (patch)
treeb20aed5ad5d852e94742217ef6e4c46448d64c92
parentadded apple functionality (diff)
downloadcsnake-46b2b2a9210269b376044ee1d208d75c772cb34a.tar.gz
csnake-46b2b2a9210269b376044ee1d208d75c772cb34a.tar.bz2
csnake-46b2b2a9210269b376044ee1d208d75c772cb34a.zip
stuff
-rwxr-xr-xa.outbin18040 -> 18040 bytes
-rw-r--r--snake.c5
2 files changed, 2 insertions, 3 deletions
diff --git a/a.out b/a.out
index fc0fad5..967bf2e 100755
--- a/a.out
+++ b/a.out
Binary files differdiff --git a/snake.c b/snake.c
index 0b8c2b4..6a9d6e3 100644
--- a/snake.c
+++ b/snake.c
@@ -17,7 +17,7 @@ void move_down(LinkedList* snake, int* new);
 void follow(int* tmp, int* prev, LinkedList* snake, int* new);
 void newApple(LinkedList* snake, int* apple);
 
-int fps = 60;
+int fps = 3;
 
 int main()
 {
@@ -100,8 +100,7 @@ void playGame(LinkedList* snake, int* apple, int* stats)
 		clear();
 		drawSnake(snake, apple);
                 refresh();
-		usleep(500000);
-		//usleep(1000000 / fps);
+		usleep(1000000 / fps);
 		i++;
 	}