board[8][8] index out of bounds exception, the test progra..

Archived from groups: rec.games.chess.computer (More info?)

This is a followup to board[8][8] index out of bounds exception.

I wrote a small test-program to see how long it takes to do the out of
bounds check with IF-statments and with a try-catch block. You were
right! Accordning to my test program using a try-catch block is 170
times slower than using IF-statments!

I guess that I study bitboard representation a bit more before I start
programming.

If there is any one else beginner java chess programmer out there,
feel free to join me in my struggle!

// Mattias
1 answer Last reply
More about board index bounds exception test progra
  1. Archived from groups: rec.games.chess.computer (More info?)

    Mattias wrote:
    > This is a followup to board[8][8] index out of bounds exception.
    >
    > I wrote a small test-program to see how long it takes to do the out
    of
    > bounds check with IF-statments and with a try-catch block. You were
    > right! Accordning to my test program using a try-catch block is 170
    > times slower than using IF-statments!
    >
    > I guess that I study bitboard representation a bit more before I
    start
    > programming.

    I would suggest you might use one of the array based implementations
    first. Bitboard stuff is a little harder to understand. The concept
    is simple, but the application can be a little mind bending.
Ask a new question

Read More

PC gaming Video Games