aboutsummaryrefslogtreecommitdiff
path: root/voerbak/readme.md
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-04-09 17:10:50 +0200
committerlonkaars <l.leblansch@gmail.com>2021-04-09 17:10:50 +0200
commit5856e80fcb78446be37456ec1e5c47b2ab02201f (patch)
treeeb600e49b8e5884c8ffc7d96719a9bd0b9764120 /voerbak/readme.md
parent24a90a67674d52dd3569cf5289b3f4b2f35f23ad (diff)
dprint format :tada:
Diffstat (limited to 'voerbak/readme.md')
-rw-r--r--voerbak/readme.md39
1 files changed, 21 insertions, 18 deletions
diff --git a/voerbak/readme.md b/voerbak/readme.md
index 1197ce3..74e616b 100644
--- a/voerbak/readme.md
+++ b/voerbak/readme.md
@@ -1,16 +1,19 @@
# Voerbak
-Here's the source for voerbak, this project's connect 4 engine. The name comes from an abbreviation for the Dutch word for connect 4: Vier Op Een Rij -> VOER + bak = voerbak
+Here's the source for voerbak, this project's connect 4 engine. The name comes
+from an abbreviation for the Dutch word for connect 4: Vier Op Een Rij -> VOER +
+bak = voerbak
-Voerbak uses a 1-dimensional array for storing the playfield, and it's printed after every move. The ordering is left to right, then bottom to top:
+Voerbak uses a 1-dimensional array for storing the playfield, and it's printed
+after every move. The ordering is left to right, then bottom to top:
-35|36|37|38|39|40|41
--|-|-|-|-|-|-
-28|29|30|31|32|33|34
-21|22|23|24|25|26|27
-14|15|16|17|18|19|20
-7|8|9|10|11|12|13
-0|1|2|3|4|5|6
+| 35 | 36 | 37 | 38 | 39 | 40 | 41 |
+| -- | -- | -- | -- | -- | -- | -- |
+| 28 | 29 | 30 | 31 | 32 | 33 | 34 |
+| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
+| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
+| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
+| 0 | 1 | 2 | 3 | 4 | 5 | 6 |
Voerbak is used in this project using api/game/voerbak_connector.py
@@ -22,9 +25,10 @@ make
## Input
-Voerbak takes moves seperated by newlines from stdin. An example game would look like this:
+Voerbak takes moves seperated by newlines from stdin. An example game would look
+like this:
-``` sh
+```sh
echo "4,3,3,2,1,2,2,7,1,7,1,7,1" | sed "s/,/\n/g" | ./voerbak
# ^ convert "," to newline
```
@@ -44,12 +48,12 @@ message type
Message reference:
-type|name|messages
--|-|-
-d|draw|full = board is full
-e|errors|full = column is full
-m|move|true|false = if it's player 1's move
-w|win|int-int = board indices where 4 was connected
+| type | name | messages |
+| ---- | ------ | --------------------------------------------- |
+| d | draw | full = board is full |
+| e | errors | full = column is full |
+| m | move | true |
+| w | win | int-int = board indices where 4 was connected |
## Command-line arguments
@@ -73,4 +77,3 @@ for any corresponding short options.
Report bugs to https://github.com/lonkaars/po-4-op-een-rij/.
```
-