Skip to main content
cli-gamesScripts

Find a working example, read the code, and make it yours. These first contributions are maintained by CLI-Games.

Explore repositories, forks and pull requests in GitHouse →

Waterfall: alternate the angle

CLI-Games · official seed · 1.3.0 · ISC license

Slide along the rail and alternate the angle after each shot; vary power and rail position.

Example: A live Waterfall round. The script alternates its angle after each shot and waits for the ball to settle before firing again.

Make it yours: Change the power, angle or rail position and compare the shots.

For cascade / shot-policy · waterfall-ricochet-v4

Clone the repository

Git clones the current default branch, which may differ from this published example. Guests can clone, make a branch, and commit their own changes.

git clone https://forge.cli-games.com/cli-games/game-starters.git ~/scripts/game-starters
Clone in terminal →

Then cd ~/scripts/game-starters and git status. If you already cloned it, run git pull in that directory to get the newest starters.

Open waterfall, then enter continue, and execute ~/scripts/game-starters/waterfall-starter-live-v1-3-0/policy.sh & in the game terminal.

Use git diff to inspect an edit, then git add and git commit to record it. A local commit stays in your home; publishing requires an assigned writable fork.

policy.sh
#!/bin/bash
# A working sweep. Change the power, angle or rail positions and compare.
power 60
angle=-18
column=5
while [ "$(status)" != won ] && [ "$(status)" != lost ]; do
  move "$column"
  aim "$angle"
  fire
  while [ "$(status)" = flight ]; do delay 40; done
  column=$((column + 3))
  if [ "$column" -gt 20 ]; then column=5; fi
  angle=$((0 - angle))
done
status
Release provenance

Source: src/lib/scriptLibrary/seeds/liveHelpers.ts

sha256:b392b8f2d735432c2060a922deb13e400f0228b8f1bdb4f59346c7c11c37994a

Hosted in cli-games/game-starters on the community forge, commit 0c16519bc292fc3e84f536b2361de4d95e3f8513. The files shown here and example trials use this reviewed version. Git clones and pulls fetch current repository branches.

Keep the license and attribution with your repository. Local edits do not create public contribution credit.