Chess Skeleton code from Anton Fil