https://github.com/strakerbit/secret-santa-challenge
This is a simple web application that lets users add friends' names to a list and randomly draw a secret friend. It’s perfect for organizing Secret Santa events or any kind of gift exchange. The app allows users to add, display, and remove friends from the list as they are drawn, providing an interactive and fun experience using JavaScript.
https://github.com/strakerbit/secret-santa-challenge
game javascript javascript-game secret-santa
Last synced: 3 months ago
JSON representation
This is a simple web application that lets users add friends' names to a list and randomly draw a secret friend. It’s perfect for organizing Secret Santa events or any kind of gift exchange. The app allows users to add, display, and remove friends from the list as they are drawn, providing an interactive and fun experience using JavaScript.
- Host: GitHub
- URL: https://github.com/strakerbit/secret-santa-challenge
- Owner: strakerbit
- License: mit
- Created: 2025-01-28T05:53:45.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-01-29T02:14:29.000Z (4 months ago)
- Last Synced: 2025-02-14T13:46:59.650Z (3 months ago)
- Topics: game, javascript, javascript-game, secret-santa
- Language: CSS
- Homepage: https://strakerbit.github.io/secret-santa-challenge/
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Secret Santa
This project is a simple implementation of a "Secret Santa" game, where users can add names to a list, randomly draw a friend from the list, and remove that friend once they have been drawn. It is developed in JavaScript and HTML and can be run directly in a browser.

## Description
The project allows users to:
- Add friends to a list.
- View the list of added friends.
- Randomly draw a friend from the list.
- Remove the drawn friend from the list after they have been selected.## Features
- Validation to avoid duplicate names.
- Alert messages when the list is empty or when there is only one friend in the list.
- The winner of the draw is displayed in the interface and removed from the friend list.## Installation
1. Clone this repository or download the code to your local machine.
```bash
git clone https://github.com/jefersonfuentes/secret-santa-challenge.git
```
2. Open the `index.html` file in a web browser to run the application.**Note:** No external dependencies are required for this project. You only need a browser that supports JavaScript.
## Usage
1. **Add friends**:
- Enter a name in the text field and click "Add".
- If the name already exists in the list, an error message will be displayed.2. **Draw a friend**:
- After adding at least two friends, click "Draw a friend".
- A random friend will be selected and displayed in the results section.
- The drawn friend will be removed from the friend list.3. **View the friend list**:
- The friend list updates automatically after adding a new name or drawing a friend.## Technologies Used
  
- **HTML**: Structure of the website.
- **CSS**: Web styling
- **JavaScript**: Logic of the application (managing the friend list, drawing friends, etc.).## Common Issues
- **The list is empty**: If you try to draw a friend when there are no names in the list, an alert will show indicating the list is empty.
- **There is only one friend in the list**: If you try to draw a friend when there is only one, an alert will show that at least two friends are required to draw.## Contributing
If you wish to contribute to this project, feel free to fork it and submit a pull request with your improvements.
## License
This project is open source and distributed under the MIT License.
Built with ❤️ by Jeferson Fuentes