A browser-based implementation of the Queens Puzzle Game using ReactJS.
- The grid is N×N (e.g., 7×7 or 9×9).
- Each cell may belong to a colored region.
- The goal is to place exactly one queen (
♛):- in every row
- in every column
- in every colored region
- Queens cannot touch each other — not even diagonally.
- The player taps to place/remove a queen or right-clicks to mark a blocked spot (like a flag or 'X').
- Once the grid is solved correctly, the player can see a "🎉 Puzzle Solved!" message.
- Node.js (version 14.0.0 or higher)
- npm (version 6.0.0 or higher)
- Clone the repository:
git clone https://github.com/yourusername/queens-puzzle-game.git
cd queens-puzzle-game
- Install dependencies:
npm install
- Start the development server:
npm start
- Open your browser and navigate to
http://localhost:3000
- Select a grid size to start the game (4×4 to 9×9).
- Left-click on a cell to place or remove a queen.
- Right-click on a cell to mark it as blocked.
- The game checks your solution automatically and shows a success message when all conditions are met.
queens-puzzle-game/
├── public/
│ ├── index.html
│ ├── favicon.ico
│ └── manifest.json
├── src/
│ ├── components/
│ │ ├── Game.js # Main game component
│ │ ├── Board.js # Game board component
│ │ ├── Cell.js # Individual cell component
│ │ ├── Controls.js # Game controls component
│ │ └── Rules.js # Game rules component
│ ├── utils/
│ │ └── puzzleGenerator.js # Helper functions
│ ├── App.js
│ ├── index.js
│ └── styles.css
├── package.json
└── README.md
- Dynamic grid size selection (4×4 to 9×9)
- Random colored regions generation
- Visual indication of attacking positions
- Cell marking functionality
- Automatic solution validation
- Responsive design
This project is licensed under the MIT License - see the LICENSE file for details.