Add 2015/mills1/try.sh + format/typo checks
The try.sh script runs the make command in the judges' remarks to make it easier. A warning is that if you have good eye-hand coordination and you're good at games and you have too much time you might end up falling asleep playing it as you'll probably never die. I only died because I was trying to mark a reminder complete on the other side of the screen at the same time as playing .. and I almost survived that .. and 'Cody's also blind' as the joke goes in the family. That's probably why I ended up dying. At that point I already had over 90 points. Still the purpose is to make it easier to play if the default settings are too frustrating. I contemplated playing with other settings but I decided not to. An example where it might be improved is to let the user pass in the environmental variables to override should they wish to but it is not even clear to me how the variables should be sanitised so that's an argument against it.
This commit is contained in:
1 parent
af310e0b3a
commit
267cbdfef3
4 files changed
+66
-18
No files matched your search
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# try.sh - demonstrate IOCCC winner 2015/mills1 - make it much easier
|
||||
#
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
# clear screen after compilation so that only the entry is shown
|
||||
clear
|
||||
|
||||
make CC="${CC}" clobber all DW=199999 DW=22 DH=16 DA=50 DI=-150 || exit 1
|
||||
|
||||
read -r -n 1 -p "Press any key to play (send EOF to quit game): "
|
||||
./prog
|
||||
exit 0
|
||||
Reference in new issue
Block a user