Marble Sorting code help

Can some one help me write my code my teach is new and is no help. I will build everything. I need help bad. image Here is a picture of my idea.

7 posts were merged into an existing topic: Need help coding