Trying to write a chess engine.