public Connection nearBaseStation() {
        for (int i = 0; i < connections.getLength(); i++) {
            Connection connection = connections.get(i);
            if (connection.getType() != CoreType.BASESTATION)
                return connection;
        }
        return null;
    }