From f7ecec003f0e4d1449cff96767b26c5c26b6003a Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 19 Jan 2024 09:25:37 -0800 Subject: [PATCH] Add 2000/schneiderwent/try.sh --- 2000/schneiderwent/README.md | 7 +++++++ 2000/schneiderwent/try.sh | 28 ++++++++++++++++++++++++++++ thanks-for-help.md | 5 +++++ 3 files changed, 40 insertions(+) create mode 100755 2000/schneiderwent/try.sh diff --git a/2000/schneiderwent/README.md b/2000/schneiderwent/README.md index f8b4aeaa1..10af15555 100644 --- a/2000/schneiderwent/README.md +++ b/2000/schneiderwent/README.md @@ -21,6 +21,13 @@ make What's the difference? +If you have a long while to spare (and you're bored enough that you could watch +paint dry :-) ) you might also try: + +```sh +./try.sh +``` + ## Judges' remarks: diff --git a/2000/schneiderwent/try.sh b/2000/schneiderwent/try.sh new file mode 100755 index 000000000..5af75696b --- /dev/null +++ b/2000/schneiderwent/try.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# +# try.sh - demonstrate IOCCC winner 2000/schneiderwent +# + +# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it +# this way allows us to have the user specify a different compiler in an easy +# way. +if [[ -z "$CC" ]]; then + CC="cc" +fi + +make CC="$CC" all >/dev/null || exit 1 + +# clear screen after compilation so that only the entry is shown +clear + +echo "This will take a long time to run to completion: " 1>&2 +i=0 +while [[ "$i" -lt 60 ]]; do + ./schneiderwent + ./schneiderwent schneiderwent.data + sleep 60 + ((i++)) +done + + + diff --git a/thanks-for-help.md b/thanks-for-help.md index 4003752ed..c8a4a90f6 100644 --- a/thanks-for-help.md +++ b/thanks-for-help.md @@ -2570,6 +2570,11 @@ on it to assign to the `int`s, much like with `1987/lievaart`. The strings are `char[5]` and the `%` specifier is `%4s` which is enough for the game. +## [2000/schneiderwent](/2000/schneiderwent/schneiderwent.c) ([README.md](/2000/schneiderwent/README.md])) + +[Cody](#cody) added the [try.sh](/2000/schneiderwent/try.sh) script. + + ## [2000/thadgavin](/2000/thadgavin/thadgavin.c) ([README.md](/2000/thadgavin/README.md])) [Cody](#cody) fixed the code and added an appropriate make rule so that the