Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: ASCII Board representation

Author: Russell Reagan

Date: 14:52:10 12/08/03

Go up one level in this thread


On December 08, 2003 at 15:42:47, Andreas Guettinger wrote:

>Does somebody know a good representation to print the board in the Console?
>I currently use
>
>8  *r *n *b *q *k *b *n *r
>7  *p *p *p *p *p *p *p *p
>6   .  .  .  .  .  .  .  .
>5   .  .  .  .  .  .  .  .
>4   .  .  .  .  .  .  .  .
>3   .  .  .  .  .  .  .  .
>2   P  P  P  P  P  P  P  P
>1   R  N  B  Q  K  B  N  R
>
>    a  b  c  d  e  f  g  h
>
>(ok, imagine we had proportional fonts), but especially the diagonals are hard
>to see. Can somebody point me towards a good example?
>I like the Crafty representation, but I don't want to create a Crafty clone
>(really no offense meant).
>
>regards
>Andy

I do it like this:

8  rnbqkbnr
7  pppppppp
6  --------
5  --------
4  --------
3  --------
2  PPPPPPPP
1  RNBQKBNR

   abcdefgh

But I think I too like Steffan's better :) I do it this way because when I
output bitboards I do it like this:

Rook attacks from e4

8  ----#---
7  ----#---
6  ----#---
5  ----#---
4  ####-###
3  ----#---
2  ----#---
1  ----#---

   abcdefgh

I like that rather than:

8  00001000
7  00001000
6  00001000
5  00001000
4  11110111
3  00001000
2  00001000
1  00001000

   abcdefgh

That way I can put a bitboard next to the board and have a similar side-by-side
comparison.

For instance, white pawns:

8  rnbqkbnr   8  --------
7  pppppppp   7  --------
6  --------   6  --------
5  --------   5  --------
4  --------   4  --------
3  --------   3  --------
2  PPPPPPPP   2  ########
1  RNBQKBNR   1  --------

   abcdefgh      abcdefgh

I can get about six of those lined up side-by-side, so I can get 12 bitboards on
an 80x25 screen at once, which makes looking at a lot of bitboards pretty easy.

For the user something like Bob's or Steffan's is probably much better.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.