lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: chess


From: Mark Christiaens
Subject: Re: chess
Date: Tue, 1 Aug 2000 09:42:35 +0200 (MET DST)

> The next step is to define a symbol
> 
>     def @ChessBoard right x
>     {
>         { Chess Base @Font { 0p lines } @Break x
>     }
> 
> so that you can write
> 
>     @ChessBoard {
>     "!\"\"\"\"\"\"\"\"#"
>     "$tMvWlVmT%"
>     "$OoOoOoOo%"
>     "$ + + + +%"
>     "$+ + + + %"
>     "$ + + + +%"
>     "$+ + + + %"
>     "$pPpPpPpP%"
>     "$RnBqKbNr%"
>     "/(((((((()"
> 
> Beyond that you should be able to define
> 
>     macro @Chess { @ChessBoard @Verbatim }
> 
> and write
> 
>     @Chess {
>     !""""""""#
>     $tMvWlVmT%
>     $ + + + +%
>     $+ + + + %
>     $ + + + +%
>     $+ + + + %
>     $pPpPpPpP%
>     $RnBqKbNr%
>     /(((((((()
>     }
> 
> There is probably even more you can do than that.  I would guess that
> you could print a blank board always (hidden within the @ChessBoard
> definition) and overstrike it with another board containing just the
> pieces, which would get rid of those clumsy characters defining the
> boundary and the black squares.  It seems bizarre to require the user
> to use two different symbols, p and P, depending on whether the pawn
> is on a white square or a black square.
> 
> Jeff

Yes, it is a bit bizarre.  It's not much of a problem for me since I've
written a program that generates boards from a set of problems.  The Lout
output is automatically generated.

You could go even further.  There is a very nice TeX package (chess
something (of course :)) that helps chess writers to typeset a whole game.
Apparently the thing understands moves.  So initially, the board is in its
starting position, then you say you make the move e2-e4 and the board is
automatically updated.  Then you can say showboard or something and the
current board is shown.  This prevents you from making a lot of mistakes
(not that I've used it in that way though).  

I used it to generate my boards before I started exploring Lout.  I got a
bit annoyed by the fact that I couldnt't place my board the way I wanted
to.  I also had to generate new fonts for every size of the board.  Lout
is much more flexible in this :).

Which brings me to another question; TeX is a programming language with
loops, if statements, ... Lout doesn't seem to have such constructs (or am
I mistaken?)  Why?


Mark Christiaens




reply via email to

[Prev in Thread] Current Thread [Next in Thread]