This is a bonus program. It's meant to be a bit challenging!

Remember to use methods to organize your code!

Karel wants to make some real art. Help her fill in any rectangular world with alternating squares of blue and green.


Note: You might have to use some extra logic for this problem. You will learn more about this logic tomorrow.

To check the opposite of any conditional, use the "bang," commonly known as the exclamation point:

// checks that the corner you are on is NOT a certain color
if (!cornerColorIs(color)) {
    ...
}

Karel should be able to paint any type of rectangular world:


Even non-square rectangles are within Karel's realm of artistic talent:


It doesn't matter where Karel ends up once she's finished; she just wants to maximize her artistic expression.