When users click the 'Add PacMan' button, a div containing an image of the iconic video game character is inserted into the DOM at a random position. Users may add a limitless number of PacMen both before and after clicking the 'Start Game' button.
Once a user starts the game, the PacMen will move across the screen at their own randomly assigned velocities, changing direction when they hit screen edges and opening/closing their mouths every half second. Users may stop the game with the 'Stop Game' button, and restart it with 'Start Game' at any point.
To start over, refresh the browser window.
To view the PacMen factory in action, visit gjosephs84.github.io/pacmen_exercise.
To modify the files or add them to your own site, download/clone the repository. All contents within the repository are required for the software to function.
In future versions I will add buttons to remove a PacMan, reset the game without refreshing the browser, and hide the start/stop button based on whether the game is running or not.
The contents of this repository are licensed MIT. See license for further information.