Exercise 2: The head

The head

As you noted in the previous exercise, the generated board had a marked cell:

GBB/1.0 size 3 3 head 0 0

Why is that? Because our computer has a head, which is always situated upon one of the board cells, and can execute different operations on it (be patient, we will get to know them).

For example, look at the following 5x2 board with the head situated on the second row and fourth column.

GBB/1.0 size 5 2 head 3 1

One important thing: we count rows from the bottom up, and columns from left to right.

The first row is the one of the bottom, and the first column is the one of the left.

Are you still with doubts? Press “send” and we will generate a 3x3 board with the head on the second column and third row.

You must sign in before submitting your solutions

Oops, your solution didn't work

  • Check that your program does not have recursion or an infinite loop
  • Check that you have an internet connection
  • Wait a while and try again

We are processing you solution

Please press F5 if results are not displayed after a few seconds