Chess Skeleton code from Oleg Gumennyi