Star Search Solver

Summary: This program solves a puzzle in which it finds the stars hidden among the squares.

Description: I implemented interactive event handling for a web-based puzzle solver inspired by the Star Search puzzle from the Mind Stretchers (Plum Edition) book. I set up a canvas element to capture user input, allowing users to mark positions by clicking or touching the grid. The code listens for mouse and touch events on the canvas, translating screen coordinates into grid positions, and also handles keyboard input for additional controls. This event-driven approach enables users to intuitively interact with the puzzle interface, laying the groundwork for solving and visualizing the Star Search puzzle directly in the browser.

Dates: 3/27/2024 – 4/2/2024

Languages: HTML and JavaScript

Skills:

  • Functions
  • innerHTML
  • Arrays
  • Drawing on canvas
  • Event handling

File:

How to Run:

  1. Open index.html

Instructions: See index.html

Repository: https://github.com/marvel3492/star-search-solver