cleanroom implementation of a chess engine. doesn't work :)