user25798: To store pieces inside an array of 64 squares (inside a one-dimensional chessboard), I would simply convert squares like:

0 is a8
1 is b8
2 is c8

...

63 is h1

This order would be natural for me, as we can then easily loop and display each square to represent the board on a document, having at the bottom the white perspective.
But looking at some documents on the computer chess, such as the 0x88 board representation, it seems that the standard way to order pieces in rather this:

0 is a1
1 is b1

...etc.
Do you think I should definitivly use this same ordering?
Or would it make more sense to adopt the more natural order (0 is a8)?

user924: They're both equally natural, they just start at a different square. But that choice is arbitrary anyway. Printing to a terminal is one of the least critical things a chess engine does with a board, and looping can go in the other direction just as easily.
If you want to be able to easily copy algorithms or code from examples or other engines (the license of which allows you to do that), it can be helpful to use the same conventions as most people do. But that's completely up to you.

25798: <p>To store pieces inside an array of 64 squares (inside a one-dimensional chessboard), I would simply convert squares like:</p>
<ul>
<li><code>0</code> is a8</li>
<li><code>1</code> is b8</li>
<li><code>2</code> is c8</li>
</ul>
<p>...</p>
<ul>
<li><code>63</code> is h1</li>
</ul>
<p>This order would be natural for me, as we can then easily loop and display each square to represent the board on a document, having at the bottom the white perspective.</p>
<p>But looking at some documents on the computer chess, such as <a href="https://en.wikipedia.org/wiki/0x88" rel="nofollow noreferrer">the 0x88 board representation</a>, it seems that the standard way to order pieces in rather this:</p>
<ul>
<li><code>0</code> is a1</li>
<li><code>1</code> is b1</li>
</ul>
<p>...etc.</p>
<p>Do you think I should definitivly use this same ordering?
Or would it make more sense to adopt the more natural order (<code>0</code> is a8)?</p>
 924: <p>They're both equally natural, they just start at a different square. But that choice is arbitrary anyway. Printing to a terminal is one of the least critical things a chess engine does with a board, and looping can go in the other direction just as easily.</p>
<p>If you want to be able to easily copy algorithms or code from examples or other engines (the license of which allows you to do that), it can be helpful to use the same conventions as most people do. But that's completely up to you.</p>
