Skip to content

Instantly share code, notes, and snippets.

View binidxaba's full-sized avatar

Binidxaba binidxaba

View GitHub Profile
@glowiak
glowiak / snake.c
Created February 11, 2024 20:26
Snake game in C/raylib in only 47 lines of code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <raylib.h>
#define TILE_SIZE 64
#define ROWS 15
#define COLS 10
static short foodPos[2], snakePos[2], snakeDirection = 0, lost = 0, gameRunCooldown = 0, snakePartTime[ROWS][COLS], creationPower = 2;
void main() {