Snake 2d (Linked-List)
A downloadable game for Windows
A console-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.
Github Link: https://github.com/Chintan-Patel-Games/Linked-List-Snake
๐ฎ Gameplay Features
- Console-based interface with keyboard input
- Classic snake movement and growth
- Different food types trigger unique linked list operations
- Game over on self-collision
๐ง Data Structures in Action
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.
๐ ๏ธ Technologies Used
- C++
- Object-Oriented Programming (OOP)
- SFML
๐ Concepts Demonstrated
- Singly and Doubly Linked Lists
- Dynamic memory management
- Collision detection
- Input handling and game loop structure
- Encapsulation and modular design using C++
Updated | 3 days ago |
Status | Released |
Platforms | Windows |
Author | Chintan Patel |
Download
Download
Snake-2D (Linked-List).zip 13 MB
Leave a comment
Log in with itch.io to leave a comment.