Implemented isCheckByDiagonal