i've made the game Othello in java and i need a way to display to the player, the move the computer did.
i can't just return a-6 or d-5 because the size of the board can be changed.
anyone has a way?
thank you in advance :)

And you expect us to explain where your code should/could be imrpoved, without seeing your code?

i just need a way of showing the player,the move the computer just made.
normally i have a 8x8 game board but it can be changed to 6x6 or something like that.
if it was constant i could have added to the side of the board a line that says" a b c d..." according to the row and "1 2 3 4 .." according to the column and then when a move is made i can just say the move was to a-4.
but if the size is changing how can i do it? say the index of the move is (4,4), i can just write that the move was to (4,4) but it would force the user to start counting rows and columns everytime.
any ideas please?

public void moveToNewPosition(){
  // insert magic implementation here
}

i can't just return a-6 or d-5 because the size of the board can be changed

Why not? That's perfectly straight forward

but how will the player know where is a-6?i need to adjust the numbers and letters surrounding the board everytime the size is changed?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.