From dbbdedd30bc73d1536f7f9e7b8ed29b0cf7a14d6 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 17 Mar 2023 07:13:34 -0700 Subject: [PATCH] Fix in 1991/westley/ttt.sh Don't assume '.' is in the path. I note that at least under macOS this game does not work. I'll be looking at the entries of this year at another time. I just need this commit in to make some other changes unrelated. The README.md was also updated - formatting fixes to turn it into a markdown file proper. --- 1991/westley/README.md | 10 +++++----- 1991/westley/ttt.sh | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/1991/westley/README.md b/1991/westley/README.md index 9397b175a..ac6c1f75d 100644 --- a/1991/westley/README.md +++ b/1991/westley/README.md @@ -11,19 +11,19 @@ ### To run - Make and run as follows: +Make and run as follows: ./westley [move_location] | tee nextmove.c - where the 'move_location' is a digit from 1 to 9 that represents - a move on a tic-tac-toe board: +where the 'move_location' is a digit from 1 to 9 that represents +a move on a tic-tac-toe board: 1 2 3 4 5 6 7 8 9 - If you omit 'move_location', then the computer moves first. For your - next move, recompile nextmove.c and play it again: +If you omit 'move_location', then the computer moves first. For your +next move, recompile `nextmove.c` and play it again: make nextmove ./nextmove move_location | tee nextmove.c diff --git a/1991/westley/ttt.sh b/1991/westley/ttt.sh index f5a37adcb..203f519a8 100755 --- a/1991/westley/ttt.sh +++ b/1991/westley/ttt.sh @@ -61,7 +61,7 @@ if [ ! -f merlyn.c ]; then fi # check to see if the copy worked if [ ! -f merlyn.c ]; then - echo "ttt: Darn, coundn't copy westley.c to merlyn.c" 1>&2 + echo "ttt: Darn, couldn't copy westley.c to merlyn.c" 1>&2 exit 4 fi fi @@ -85,9 +85,9 @@ fi if [ ! -w ttt_game.c ]; then rm -f ttt_game.c if [ -z "$move" ]; then - merlyn | tee ttt_game.c + ./merlyn | tee ttt_game.c else - merlyn "$move" | tee ttt_game.c + ./merlyn "$move" | tee ttt_game.c fi chmod +w ttt_game.c