This project is pretty basic. It uses basic math to calculate the angle of reflection. Move the slider to change the angle of light. This can be done by (in scratch's case) subtracting the angle of the light from 180°. This would produce an angle of the opposite direction. If you want to change the mirrors, press space.
If you want to see something more advanced, go check out "Light Refraction Simulation" on my profile.