From 6c88b3c89b8f0efbbd31e466d8727495d7b23c88 Mon Sep 17 00:00:00 2001 From: Darius Drake Date: Thu, 7 Dec 2023 16:23:17 -0400 Subject: [PATCH] Updated: fix traling SNAKE_BODY char on board --- serpent | Bin 31088 -> 31176 bytes serpent.c | 6 +++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/serpent b/serpent index 6c24cb015dea239d4587ea591e546247427c6230..a6a5d53eac18712bcf1bfc30eb73a4f24669e38f 100755 GIT binary patch delta 5713 zcmZWt2~<>9ntt~!MHNsKMHNt0EJd+zvI#*@mST}YAua*M1tn3jO&kZ81WmV;f;yqA z9VORn9TN4V=kyZen3QSlv{4e17GheBr`w5>Nt-ri23sc@GbXk<%6$KORfL?r=iGPy z`+xs-|GQS*yv2sUX1g;*PuD>9Ukv+=f?D?b&8%Crp6wG_pT6{TMOVR(Z9A^V&03Sv zanC;}bw{|eLIvU4h{?Hy#QW|%@%Ys#MEJ66% z)Dzli>KX1dbzS@d#6`ofY1@yOAhde=zi`iY&vUmn_TO{2Jml%Sp6T(;(0hC}kse=( zQPXA6kL)zve+T-Xk^ad}x2fk!S)yqhM+lyNkG|7%0j(QKU6G#tb&;M^)AbZyqUTg~ zBoR%%wUJHz>-3Gj>3Yxhp~p?vicQXHK4wc~nLN=xt+-P*ZC^GvHU>+rNAYPM!l!(s`sTxVwdx!pf8gn#jeu(O zjr|Q6!Ug?RBYeQKa59iUH3eD%Jidx08G?X3jCOuAHsJ*G!gZzNNJq9iU zGi^%*a(oGyAA$O{Gr;x%J6=hw-+~3kE;4cZe$Yf0Ogsqorl5^a03Dx33Oh7~rKIrw zxI(q&voR?DD#<@V^7AzLe4ZE|<2@lE7dtD4&=d|~eU7dqy`2?rgE5+;(Z46!Ie~A{ z=wafAX!M_m{_bm4_hX`OX!LoaKiBB9ME{3I{}FWi)epSreLuUco}DH60O0>EG+ICb zg$^0YFKWtfkfB`~{S@*0H2N^n-5Na#y8Y^-=uEJG%M_{nk3tSgPKnesS9H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_pFn2LY;qnf#ymhhVTDSR( z8f}uF_I}j*jpBW8u9qvncyQrb?~Zx5I6p5Q@5q*JImD|SiChwY??~l4#P^_cguOEb z&+^Wao_?GKN4pW;k?WHh9z8bTW#rT)&svU zF0L&LE}pG(H&l_cZafOMa9uU85c}6vTNW+Sq1VNB#U^gAOT(?hwZ0mEuPns#9dX) > 0) || (ABS(snake->dY) > 0)) { int new_head_x = snake->head->pX + snake->dX; int new_head_y = snake->head->pY + snake->dY; + int new_tail_x = snake->tail->pX + snake->dX; + int new_tail_y = snake->tail->pY + snake->dY; if (!appleOccupies(new_head_x, new_head_y)) { // Move the tail to the new position @@ -327,8 +329,10 @@ void moveSnake(board_t *board) { snake->head->prev = new_head; snake->head = new_head; - // Append a new node to the snake + // Append a new node to the snake's tail appendSnakeNode(snake); + snake->tail->pX = new_tail_x; + snake->tail->pY = new_tail_y; } // Check for collisions and update the snake