Compare commits

...

14 Commits

Author SHA1 Message Date
D. Joe a1c212cdeb Draft instructions for playing in a new, match-specific repository 2022-07-23 12:04:56 -04:00
D. Joe 654a5e22fc A complete set of instructions for using the demo directory 2022-07-23 11:58:49 -04:00
D. Joe 2d4ef383a0 Spurious format-patch board file removed 2022-07-23 11:58:03 -04:00
D. Joe f9368d7b53 Still same problem with unignoring things in demo/ that I don't have with things in games/ 2022-07-23 11:55:52 -04:00
D. Joe 21bfdad6b2 Applying move # 9 2022-07-23 11:27:28 -04:00
D. Joe 2e81891a4c Applying move # 8 2022-07-23 11:27:28 -04:00
D. Joe e1fbd976cf Applying move # 7 2022-07-23 11:27:28 -04:00
D. Joe 31a7074966 Applying move # 6 2022-07-23 11:27:28 -04:00
D. Joe 591d1242d3 Applying move # 5 2022-07-23 11:27:28 -04:00
D. Joe aad81f5347 Applying move # 4 2022-07-23 11:27:28 -04:00
D. Joe a773b60ba5 Applying move # 3 2022-07-23 11:27:28 -04:00
D. Joe 341b26f3f0 Applying move # 2 2022-07-23 11:27:28 -04:00
D. Joe efcd034abd Applying move # 1 2022-07-23 11:27:28 -04:00
D. Joe 2695353f76 Applying move # 0 2022-07-23 11:27:28 -04:00
5 changed files with 91 additions and 14 deletions

3
.gitignore vendored
View File

@ -1,5 +1,6 @@
games/*
#demo/*
!games/README.md
#demo
!games/HOWTO.md
!demo/README.md
!demo/move

View File

@ -0,0 +1,18 @@
The `move` directory gives a complete demonstration game, one move per file.
An entire example game repository can then be build from these moves:
```
mkdir format-patch
cd format-patch
git init
git checkout -b main
for i in ../move/*; do \
echo cp $i board \; \
git add board \; \
git commit -m \
\""Applying move #" $(basename $i .md)\" \; \
git format-patch -1; \
done | sh
cd ..
```

16
demo/HOWTO-git.md Normal file
View File

@ -0,0 +1,16 @@
The `move` directory gives a complete demonstration game, one move per file.
An entire example game repository can then be build from these moves:
```
mkdir git
cd git
git init
for i in ../move/*; do \
echo cp $i board \; \
git add board \; \
git commit -m \
\""Applying move #" $(basename $i .md)\"; \
done | sh
cd ..
```

View File

@ -1,16 +1,7 @@
The `move` directory gives a complete demonstration game, one move per file.
An entire example game repository can then be build from these moves:
An entire example game repository can then be build from these moves.
```
mkdir git
cd git
git init
for i in ../move/*; do \
echo cp $i board \; \
git add board \; \
git commit -m \
\""Applying move #" $(basename $i .md)\"; \
done | sh
cd ..
```
To see how one might do this locally, see HOWTO-git.md
See HOWTO-format-patch.md for how one might generate patch files to send to a remote player.

51
games/HOWTO.md Normal file
View File

@ -0,0 +1,51 @@
Clone the game repository
```
git clone https://tildegit.org/deejoe/format-patch-ttt
```
Move into the repository
```
cd format-patch-ttt
```
Move into the `game` subdirectory
```
cd game
```
Create a new directory for each name.
The new directory can be called anything, but using the date is not a bad
idea.
Initialize a new repository specifically for this game.
Then, bring in a fresh copy of a blank board file.
Add and commit the blank board file.
Edit the board with your move.
Add and commit the board with your move.
Create a patch with your move.
```
mkdir ttt-YYYY-MM-DD
cd ttt-YYYY-MM-DD
git init
cp ../board.md .
git add board.md
git commit -m "A blank board to start"
# edit the board to include your move
git add board.md
git commit -m "First move by NAME as X"
git format-patch -1
```
Finally, send the resulting patch file to your opponent, for instance, as an
email attachment.
Good luck!