Deviopath › Karel

Bigger Pile Wins

Hard · Variables

There is a pile of balls under Karel and another pile at the far end of the row. Find out which pile is smaller, carry all of its balls onto the bigger pile, and finish standing on the merged pile.

The two piles are never the same size, and one of them may be empty. Your code runs in several worlds.

Hint: count each pile with a variable (and put the balls back), then compare the numbers with if.

Next: Tallest Tower