A SFML-based version of the classic Snake game implemented in C++. This project uniquely integrates Linked List and Doubly Linked List data structures to represent the snake and simulate operations based on the food it consumes.
- SFML-based interface with keyboard input
- Classic snake movement and growth
- Different food types trigger unique linked list operations
- Game over on self-collision
This project uses:
-
The snake body is managed using a Singly Linked List or a Doubly Linked List, based on the selected branch, with food items triggering corresponding operations.
-
Food-triggered behaviors:
- ๐ Burger - Insert at head
- ๐ง Cheese - Insert in middle
- ๐ Pizza - Insert at tail
- ๐ Apple - Delete at head
- ๐ฅญ Mango - Delete at middle
- ๐ Orange - Delete at tail
- โ ๏ธ Poison - Delete half nodes
- ๐ท Alcohol - Reverse Direction
-
Each food item maps to a specific linked list operation, turning gameplay into a fun data structure demo.
- C++
- Object-Oriented Programming (OOP)
- SFML
git clone https://github.com/Chintan-Patel-Games/Linked-List-Snake.git- Run the game
- Singly and Doubly Linked Lists
- Dynamic memory management
- Collision detection
- Input handling and game loop structure
- Encapsulation and modular design using C++