Hacker News new | ask | show | jobs
by FreeFull 2762 days ago
Even better, a chess board has 64 squares, so you can use a single 64-bit integer to store, say, the position of all white pawns, and repeat this for all the kinds of pieces. Then, you have a compact and fast data representation for your chess engine.
1 comments

The important part is - the way you represent the data matters a lot, and almost any representation will make more sense than bunch of "objects" scattered around.