The underlying algorithm for the Plinko simulator is based on a two-dimensional array with the width and 💸 height of the board being simulated. The values in the array correspond with the slots between a row of pegs, 💸 an empty position is represented by a zero, and the current position of the chip is represented by a one.