Exercise 11: Grab stones

Grab stones

In the same way that there is a “drop a stone” (Drop), there is a “grab a stone” (Grab), which removes exactly one stone of the given color.

For example, the following program grabs two stones of the initial position.

program {
  Grab(Red)
  Grab(Red)
}

Knowing this, write a program which removes only the small red ball of this board. Watch out! Pay attention to the position of the head. : wink:

GBB/1.0 size 2 2 cell 1 0 Rojo 1 cell 1 1 Negro 1 head 1 1

Give me a hint!

Maybe you need to move the head before trying to grab the stone.

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