Sha256: fd8ed89d167a80bb562607b8f17b29a6adeb278fe46e791fa83da2e6bb77cabb

Contents?: true

Size: 1.06 KB

Versions: 14

Compression:

Stored size: 1.06 KB

Contents

procedure Before() {
  x := 0
  y := 0

  while(puedeMover(Sur)) {
    x := x + 1
    Mover(Sur)
  }
  while(puedeMover(Oeste)) {
    y := y + 1
    Mover(Oeste)
  }

  NextStage()

  while(x > 0) {
    x := x - 1
    Mover(Norte)
  }
  while(y > 0) {
    y := y - 1
    Mover(Este)
  }
}

procedure After() {
  GoToOrigin()
  NextStage()
}

procedure NextStage() {
  while(puedeMover(Norte)) {
    NextRowStage()
    Mover(Norte)
  }
  NextRowStage()
  GoToOrigin()
}

procedure NextRowStage() {
  while(puedeMover(Este)) {
    Poner(Verde)
    Mover(Este)
  }
  Poner(Verde)
  IrAlBorde(Oeste)
}

procedure ShiftLeft() {
  ShiftTo(Oeste)
}

procedure ShiftRight() {
  ShiftTo(Este)
}

procedure ShiftUp() {
  ShiftTo(Norte)
}

procedure ShiftDown() {
  ShiftTo(Sur)
}

procedure ShiftTo(dir) {
  if (puedeMover(dir)) {
    Sacar(Rojo)
    Mover(dir)
    Poner(Rojo)
    CheckCollision()
  }
}

procedure CheckCollision() {
  if (hayBolitas(Azul) && nroBolitas(Azul) mod 2 == 0) {
    After();
    BOOM("Colision")
  }
}

procedure GoToOrigin() {
  IrAlBorde(Sur)
  IrAlBorde(Oeste)
}

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mumuki-gobstones-runner-2.13.0 lib/game_framework/extra.gbs.erb
mumuki-gobstones-runner-2.12.1 lib/game_framework/extra.gbs.erb
mumuki-gobstones-runner-2.12.0 lib/game_framework/extra.gbs.erb
mumuki-gobstones-runner-2.11.0 lib/game_framework/extra.gbs.erb
mumuki-gobstones-runner-2.10.1 lib/game_framework/extra.gbs.erb
mumuki-gobstones-runner-2.10.0 lib/game_framework/extra.gbs.erb
mumuki-gobstones-runner-2.9.1 lib/game_framework/extra.gbs.erb
mumuki-gobstones-runner-2.9.0 lib/game_framework/extra.gbs.erb
mumuki-gobstones-runner-2.8.5 lib/game_framework/extra.gbs.erb
mumuki-gobstones-runner-2.8.4 lib/game_framework/extra.gbs.erb
mumuki-gobstones-runner-2.8.3 lib/game_framework/extra.gbs.erb
mumuki-gobstones-runner-2.8.2 lib/game_framework/extra.gbs.erb
mumuki-gobstones-runner-2.8.1 lib/game_framework/extra.gbs.erb
mumuki-gobstones-runner-2.8.0 lib/game_framework/extra.gbs.erb