This code snippet is provided to you for free.

Plinko.bas  demonstrates using the palette to simulate a ball falling.

Plinko.gif is the GIF file that if you examine with your graphics
editor. You will notice that I drew circles to represent each ball
location.  Each circle has its own color attribute.  

The peg locations all have the same color attribute, using the color
red.  

As the "ball" moves down, the color attributes for each ball location
are turned off then on to simulate the ball falling.

