Compare commits
14 Commits
e4ccf24544
...
a1c212cdeb
Author | SHA1 | Date |
---|---|---|
D. Joe | a1c212cdeb | |
D. Joe | 654a5e22fc | |
D. Joe | 2d4ef383a0 | |
D. Joe | f9368d7b53 | |
D. Joe | 21bfdad6b2 | |
D. Joe | 2e81891a4c | |
D. Joe | e1fbd976cf | |
D. Joe | 31a7074966 | |
D. Joe | 591d1242d3 | |
D. Joe | aad81f5347 | |
D. Joe | a773b60ba5 | |
D. Joe | 341b26f3f0 | |
D. Joe | efcd034abd | |
D. Joe | 2695353f76 |
|
@ -1,5 +1,6 @@
|
|||
games/*
|
||||
#demo/*
|
||||
!games/README.md
|
||||
#demo
|
||||
!games/HOWTO.md
|
||||
!demo/README.md
|
||||
!demo/move
|
||||
|
|
|
@ -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 ..
|
||||
```
|
|
@ -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 ..
|
||||
```
|
|
@ -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.
|
||||
|
|
|
@ -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!
|
Loading…
Reference in New Issue