Exercise 8: Replacing stones

Replacing stones

Are you already asleep?

Let's move on to something more difficult. We will give you a 2x2 board (that is to say, with 4 cells), where very cell has a red stone. Your task is to write a program which replaces all red stones by green stones.

Inicial Final
GBB/1.0 size 2 2 cell 0 0 Rojo 1 cell 0 1 Rojo 1 cell 1 0 Rojo 1 cell 1 1 Rojo 1 head 0 0 GBB/1.0 size 2 2 cell 0 0 Verde 1 cell 0 1 Verde 1 cell 1 0 Verde 1 cell 1 1 Verde 1 head 0 1
Give me a hint!

The idea of replacing one stone by another one, is something that us, human beings, can understand.

On the other hand, Gobstones only understands Drop and Grab. Think how you can combine those operations in order to reach the desired effect.

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