It's good for manual entry by human, though rows
are not very visible. For processing in code,
such may be considered:
P=: ' PNBRQKpnbrqk'
cmax=: [^:(>&(a.&i.))"0
charboard=: 1j1 #"1 (' .'{~2|+/~i.8) cmax~ ]
$BEGIN=: (,|[EMAIL PROTECTED]) ' ',~' ',~'rnbqkbnr',:'p'
8 8
charboard BEGIN NB. character display
r n b q k b n r
p p p p p p p p
. . . .
. . . .
. . . .
. . . .
P P P P P P P P
R N B Q K B N R
There is also a new J Wiki page for bitmap layout
http://www.jsoftware.com/jwiki/Scripts/Chess_Generator
--- Roger Hui <[EMAIL PROTECTED]> wrote:
> See my user page on the Wikipedia:
> http://en.wikipedia.org/wiki/User:Roger_Hui
> The syntax is explained in:
> http://commons.wikimedia.org/wiki/Standard_chess_diagram
>
> The chess diagrams you see on my user page are
> generated with the following code:
>
> {{Chess diagram small|=|tleft|
> | | | | | | |ql| |=
> | |ql| | | | | | |=
> | | | | | |ql| | |=
> | | |ql| | | | | |=
> |ql| | | | | | | |=
> | | | | | | | |nl|=
> | | | |nl|nl| | |nl|=
> | | | | |nl| | | |=
> |
> }}
>
> {{Chess diagram small|=||
> | | | | | | |nl|nl|=
> | | | |ql| | | | |=
> | |ql| | | | | | |=
> | | | | | | |nl|nl|=
> | | | | | | | |nl|=
> |ql| | | | | | | |=
> | | |ql| | | | | |=
> | | | | | |ql| | |=
> |
> }}
>
>
>
> ----- Original Message -----
> From: Björn Helgason <[EMAIL PROTECTED]>
> Date: Thursday, August 31, 2006 0:07 am
> Subject: Re: [Jprogramming] Dealing a bridge hand
>
> ...
> And on a similar topic - do you know how to get the chess pieces
> to display
> like you do with the cards?
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm