A fun, interactive elimination game where players strategically select numbers to avoid being the farthest from the average. Built with Python and Streamlit for seamless browser gameplay.
- Players take turns selecting numbered buttons (0-99)
- System calculates the average of all selections
- Player farthest from the average gets eliminated
- Last remaining player wins!
- 2-Player Mode: Lowest number wins (equal numbers = both lose)
- 3-Player Mode: If two choose same number, they lose and third wins
- Tie-Breakers: Tied players compete in sudden-death rounds
- Duplicate Protection: Players choosing same numbers get eliminated
- Smart Elimination: Handles all edge cases automatically
- Beautiful Streamlit interface with animated buttons
- Responsive design works on all devices
- Session state management for smooth gameplay
- Loading animations between screens
- Color-coded visual feedback
- Setup: Choose local multiplayer and enter player names
- Gameplay: Each player selects a number when their turn comes
- Calculation: System computes average after all selections
- Elimination: Farthest player(s) get eliminated
- Repeat: Continue until one player remains
- Clone the repository:
git clone https://github.com/yourusername/button-game.git
cd button-game2.Install dependencies:
pip install streamlit3.Run the game:
streamlit run game.pyThe game is live and playable at:
🔗 https://buttongame.streamlit.app/
- Strategic Selection: Choose numbers carefully to stay close to the average
- Special Scenarios: Unique rules for 2-player and 3-player games
- Tie Resolution: Sudden-death rounds for tied players
- Duplicate Penalty: Matching numbers cause instant elimination
- Group Elimination: All lose if identical numbers are chosen
- Online multiplayer functionality
- Player profiles and statistics tracking
- Custom rule configurations
- Themed button designs and skins
- Competitive tournament mode
Contributions welcome! Please:
- Open an issue to discuss proposed changes
- Submit pull requests for review
- Follow existing code style
This project is licensed under the MIT License - see the LICENSE file for details.