Trying to implement a chess game