Subscribe to our emails
Be the first to know about new collections and special offers.
public void run() fillRow(); while (leftIsClear()) moveToNextRow(); fillRow(); if (rightIsClear()) moveToNextRow(); fillRow();
If a row ends on a beeper, the next row must start with a blank space. 645 checkerboard karel answer verified
public class CheckerboardKarel extends SuperKarel public void run() fillRow()
Understanding the Karel 645 Checkerboard Problem: Verified Solution and Logic while (leftIsClear()) moveToNextRow()
function fillRow() putBeeper(); // Start with a beeper while(frontIsClear()) move(); if(frontIsClear()) move(); putBeeper(); Use code with caution. Copied to clipboard