Important: We've Embedded JavaScript and CSS Inside HTML
We're excited to present our N-Queens game implementation! In an effort to streamline the deployment process and enhance accessibility, we've embedded both the JavaScript and CSS code inside the HTML file. This means you can now run the game directly in your web browser with only one file, eliminating the need for multiple JavaScript and CSS files.
- Customizable Board Size: You can choose the size of the chessboard (N) according to your preference.
- Interactive Gameplay: Easily place queens on the board by clicking on the desired square.
- Visual Feedback: Queens are visually represented on the board, making it easy to see where they are placed.
- Solution Validation: The game validates your placement of queens in real-time, ensuring that no two queens threaten each other.
- Solve with AI: While you can solve the puzzle manually, you can also challenge yourself by using an AI algorithm to find solutions.
- Scalable Architecture: Implemented using embedded HTML, CSS, and JavaScript, making it lightweight and easily portable with only one file.
- Open the
index.html
file in your preferred web browser. - Choose the size of the chessboard by entering a number for N.
- Click on a square on the board to place a queen.
- The game will validate your placement in real-time.
- Continue placing queens until you have a solution where no two queens threaten each other.
- You can also opt to use an AI algorithm to find solutions automatically.