mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-25 09:58:11 +01:00
add README so I don't forget how this branch is special
This commit is contained in:
parent
513073a32c
commit
f68fdab532
1 changed files with 97 additions and 0 deletions
97
xwords4/linux/README.MOVELIST_BRANCH
Normal file
97
xwords4/linux/README.MOVELIST_BRANCH
Normal file
|
@ -0,0 +1,97 @@
|
|||
*** Note on how the runs-and-waits-to-be-fed-racks feature of this ***
|
||||
*** branch works ***
|
||||
|
||||
You start the app in one terminal/process and feed it data from
|
||||
another. Feed it boards via one named pipe and racks (palettes) via
|
||||
another. Feeding it a board changes its configuration and effects
|
||||
subsequent racks. Feeding it a rack causes it to print out all the
|
||||
moves possible using that rack and the most recent board you fed it.
|
||||
|
||||
When you first start it, it has an empty board (unless you provide one
|
||||
via the --board param). You can feed it racks at that point if you
|
||||
want.
|
||||
|
||||
So, some examples:
|
||||
|
||||
1) Make a couple of pipes
|
||||
|
||||
# mkfifo /tmp/board_pipe
|
||||
# mkfifo /tmp/rack_pipe
|
||||
|
||||
Start it up (in one terminal), giving it a dictionary and the two
|
||||
pipes
|
||||
|
||||
# ./obj_linux_rel/xwords --board-pipe /tmp/board_pipe --rack-pipe /tmp/rack_pipe --game-dict dict.xwd
|
||||
|
||||
If you want to be able to tell when per-rack output begins and ends,
|
||||
e.g. to have an automated process more readily detect the end of the
|
||||
(possibly empty) output for a single rack, use the --rack-header and
|
||||
--rack-footer params, e.g. --rack-header '---HEADER---' --rack-footer
|
||||
'---FOOTER---'
|
||||
|
||||
It will keep running now, so switch to another terminal. Remember
|
||||
that it has an empty board
|
||||
|
||||
# echo DESTROY > /tmp/rack_pipe
|
||||
|
||||
You'll see this appear on the original terminal
|
||||
---HEADER---
|
||||
0080:HhD:STROYED:STROYED
|
||||
0080:HhA:STROYED:STROYED
|
||||
0080:HfD:DESTROY:DESTROY
|
||||
0080:FhA:DESTROY:DESTROY
|
||||
0076:HfD:STROYED:STROYED
|
||||
0076:HdD:DESTROY:DESTROY
|
||||
0076:FhA:STROYED:STROYED
|
||||
0076:DhA:DESTROY:DESTROY
|
||||
0074:HhD:DESTROY:DESTROY
|
||||
0074:HhA:DESTROY:DESTROY
|
||||
skipping remaining 1172 moves
|
||||
---FOOTER---
|
||||
|
||||
There are four :-delimited columns. The first is the score. The
|
||||
second where the first tile is placed and direction: column, row, and
|
||||
D for down or A for across. Then the tiles placed. And finally the
|
||||
word formed -- which may include tiles that were already on the board.
|
||||
The latter two will be different after we load a board with contents.
|
||||
Here's one:
|
||||
|
||||
# cat board.txt
|
||||
...............
|
||||
...............
|
||||
...............
|
||||
...............
|
||||
...............
|
||||
........T......
|
||||
.......DOWN....
|
||||
.......ON......
|
||||
........G......
|
||||
........U......
|
||||
.....TAKE......
|
||||
...............
|
||||
...............
|
||||
...............
|
||||
...............
|
||||
|
||||
# cat board.txt > /tmp/board_pipe
|
||||
|
||||
then
|
||||
# echo DESTROY > /tmp/rack_pipe
|
||||
|
||||
And from the other terminal:
|
||||
---HEADER---
|
||||
0090:EiD:DESTROY:DESTROY
|
||||
0089:IlA:DESTROY:DESTROY
|
||||
0088:LaD:DESTROY:DESTROY
|
||||
0086:LcD:STROYED:STROYED
|
||||
0084:IlA:STROYED:STROYED
|
||||
0083:LgD:STROYED:STROYED
|
||||
0083:AlA:DESTROY:DESTROY
|
||||
0074:KaD:DRYSTOE:DRYSTONE
|
||||
0071:LeD:DESTROY:DESTROY
|
||||
0048:HlD:YTES:KYTES
|
||||
skipping remaining 1051 moves
|
||||
---FOOTER---
|
||||
|
||||
Note that with the line 0074:KaD:DRYSTOE:DRYSTONE the word formed and
|
||||
tiles used are different: 'N' is used off the board.
|
Loading…
Reference in a new issue