Arduino school project help to check if my code is roughly correct

can you guys help me see if you can understand the code from just the drawing ?

rotate right side of drawinf by 180°, then it's obvious

I have edited the drawing is it easier to understand now ?

Since the code in your picture is not complete and won't compile then it won't work. It's my experience that incomplete code that doesn't compile never works.

See "How to use this forum - please read" at the top of the forum. Then post a complete program here (NOT a picture). Then we should be able to help.

Steve

Here's how to "inline" your pix, OP, and here it is inlined for you: