Skip to content

AmrShoukry/N-Queens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

N-Queens Game

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.

Features

  • 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.

How to Play

  1. Open the index.html file in your preferred web browser.
  2. Choose the size of the chessboard by entering a number for N.
  3. Click on a square on the board to place a queen.
  4. The game will validate your placement in real-time.
  5. Continue placing queens until you have a solution where no two queens threaten each other.
  6. You can also opt to use an AI algorithm to find solutions automatically.

Contributors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages