private boolean validMove(Piece piece) {
    // Just ignore moves on spots that are already taken.
    if(pieces[piece.getX()][piece.getY()] != null) {
      return false;
    }
    
    ArrayList<Piece> moves = getValidMoves(piece.getColor());
    
    if(!moves.contains(piece)) {
      return false;
    }
    
    return true;
  }