Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnacBrychta authored Dec 14, 2023
1 parent 133eba3 commit a316de3
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,55 @@
# SnakeWinForms
# Snake Project Overview
![Main photo](https://media.discordapp.net/attachments/1076565079333548184/1184885784365506732/2023-12-14_16_52_39-Ignacuv_had.png?ex=658d99e1&is=657b24e1&hm=da3581a013fa47774b3501f42fedf5ed0f18f32fd44d73bacd6a8a58870d081e&=&format=webp&quality=lossless&width=1655&height=988)


## Project Structure
The Snake project is implemented in C# using Windows Forms. It consists of a main form (`MainWindow`) and various supporting classes.

### Key Components
1. **Snake Class:** Represents the snake in the game. Manages its movement, collision detection, and scoring.
2. **GameDrawer Class:** Responsible for drawing game elements on the screen, including the snake, fruits, and game overlays.
3. **CursorChange Class:** Configures custom cursor files for different game states.

## Game Logic
- The game starts with a snake composed of a specified number of segments.
- The player controls the snake's movement using the W, A, S, D keys.
- Fruits appear on the screen, and the player must guide the snake to collect them.
- The snake grows longer with each collected fruit, and the player earns points.
- Collision with the snake's own body or game borders results in game over.
- The game can be won by collecting a set number of fruits.

## User Interface
- The main window is maximized and displays the game area.
- Sound settings (on/off) can be toggled using a radio button.
- Speed information is displayed in a text box.
- Score information is displayed in another text box.
- Buttons for starting, stopping, and resetting the game.

## Sound Effects
- Sound effects are played for collecting fruits, winning the game, and when the game is over.
- Background music plays during gameplay.

## Configuration and Settings
- Custom cursor files are configured for different game states.
- The program includes options to customize cursor files.

## Scaling and Display
- The game window is designed to scale with the screen size.
- The game warns users if their display may not render the game correctly.

## Additional Features
- The game adjusts the snake's speed based on the player's score.
- Winning the game triggers a victory screen.
- The game over screen is displayed in case of collisions.

## Notes
- The project includes a link to the author's GitHub profile.
- Certain features may be designed for specific display configurations.

## Dependencies
- NAudio library is used for audio playback.

## Acknowledgments
The project credits the author and provides links to external resources.

**Disclaimer:** This documentation assumes a basic understanding of C# and Windows Forms.

0 comments on commit a316de3

Please sign in to comment.