This has been such a fun activity because with this simple code you can create as many pacmen as you want and then start them moving randomly throughout the page without leaving the page, when a pacman hits any screen border it bounces back. Also, you can increase speed by clicking the 'Start Game' button.
I really enojoy this exercise and you can play with this code by clicking here: PacMen Factory