src/main/java/com/webcheckers/util/board/Space.java
/**
     * Checks if the given space is valid for a piece to
     * be placed on.
     *
     * @return true if black space, false if white space.
     */
Checks if the given space is valid for a piece to
be placed on.

@return true if black space, false if white space.
Checks if the given space is valid for a piece to be placed on . @return true if black space false if white space .
public boolean isValid(){
        if (this.getPiece() != null){
            return false;
        }
        if (row%2 == 0 && cellIdx%2 != 0){
            return true;
        }
        else if (row%2 != 0 && cellIdx%2==0){
            return true;
        }
        else{
            return false;
        }
    }
public boolean isValid ( ) { if ( this . getPiece ( ) != null ) { return false ; } if ( row % 2 == 0 && cellIdx % 2 != 0 ) { return true ; } else if ( row % 2 != 0 && cellIdx % 2 == 0 ) { return true ; } else { return false ; } }
Checks if the given space is valid for a piece to
 be placed on.
Checks if the given space is valid for a piece to be placed on .