Chessboard function done.