Java: How do I do position (x,y) based indexing with extremely high performance?

I have a game board that's a square 2 dimensional space of up to 64 by 64 tiles. Every tile can, but does not always contain a game piece. As part of an AI algorithm that generates possible future states to analyze I need to be able to:

Insert and remove game pieces at coordinates x,y (1m+ times a second )

Check whether a game piece is present using coordinates x,y (1m+ times a second)

Access these game pieces (1m+ times a second)

Clone a board (100k+ times a second)

The obvious solution is...

Read More »

By: StackOverFlow - Wednesday, 7 November

Related Posts

  • Older News
  • Array Indexing vs Looping StackOverFlow (2 days ago) - I would like to know the performance difference while using array indexing vs looping against each approach for below code// Looping:int N; // input from userint data[N][N];for(int i = 0;...