I am trying to learn JavaJava by doing some (easy) ACM ICPC problems. The problem consist to check if the knight in a chess game can move from a point A(r1, c1)A(r1, c1)
to B(r2, c2)B(r2, c2)
with one move only. Here the code I wrote:
inputInput:
Output:
Where the first number is n
, the number of block in the chessChess board (in the normal chessChess board n=8n = 8).
I'm looking for a review in terms of best practices, things things I should or shouldn't do, or or things I should do in another way.