private void setSpots(int r, int c, int spots, String color) {
        if (!_board.exists(r, c)) {
            throw error("board does not exist at %d %d", r , c);
        }
        if (spots < 0) {
            throw error("can only set a nonnegative number of spots");
        }

        if (spots <= _board.neighbors(r, c)) {
            Color player = null;
            if (spots == 0) {
                player = WHITE;
            } else if (color.equalsIgnoreCase("r")) {
                player = RED;
            } else if (color.equalsIgnoreCase("b")) {
                player = BLUE;
            }
            _board.set(r, c, spots, player);
        } else {
            throw error("invalid request to put %d spots"
                    + " on square %d %d", spots, r, c);
        }
    }