예제 #1
0
    //////////////////////
    // Auxiliar Methods //
    //////////////////////

    void SetInitialValues(PLACE leisurePlace, LeisureSchedule schedule, float satisfactionValue, int cost,
                          AVAILABILITY availability, CityPart.PLACE cityPlace)
    {
        Cost              = cost;
        LeisurePlace      = leisurePlace;
        Schedule          = schedule;
        this.availability = availability;
        LeisurePlace      = leisurePlace;
        switch (leisurePlace)
        {
        case PLACE.CINEMA: LeisureType = TYPE.SHOW; break;

        case PLACE.PARK: LeisureType = TYPE.CALM; break;

        case PLACE.GYM: LeisureType = TYPE.SPORT; break;

        case PLACE.DISCO: LeisureType = TYPE.PARTY; break;

        default: LeisureType = TYPE.CALM; break;
        }
        this.availability = availability;
        Satisfaction      = new ConditionableIndex("Satisfacción", "Representa como de satisfactorio es ir a " + Global.Names.leisurePlaces[(int)leisurePlace]
                                                   + " en el barrio " + Global.Names.cityPart[(int)cityPlace], satisfactionValue);
        CityPlace = cityPlace;
    }
예제 #2
0
    //////////////////
    // Constructors //
    //////////////////

    public TransportSector(float technologyValue, float investmentValue, CityPart.PLACE cityPlace)
    {
        CityPlace  = cityPlace;
        Technology = new ConditionableIndex("Tecnología", "Nivel de la tecnología de los transportes en el barrio "
                                            + Global.Names.cityPart[(int)cityPlace], technologyValue);
        Investment = new ConditionableIndex("Inversión", "Nivel de inversión dirigida a los transportes en el barrio "
                                            + Global.Names.cityPart[(int)cityPlace], investmentValue);
        SectorPollution = new RepresentativeIndex("Contaminación del sector", "Nivel de contaminación producida por los transportes en el barrio "
                                                  + Global.Names.cityPart[(int)cityPlace], 0.5f);

        transportsCount = Enum.GetNames(typeof(Transport.TYPE)).Length;
        Transports      = new Transport[transportsCount];
        freeSpaces      = new int[transportsCount];

        Transports[(int)Transport.TYPE.ROAD]
            = new Transport(Transport.TYPE.ROAD, Transport.EXPANSION.NONE, Transport.ENHANCEMENTS.NONE, cityPlace);
        Transports[(int)Transport.TYPE.SUBWAY]
            = new Transport(Transport.TYPE.SUBWAY, Transport.EXPANSION.NONE, Transport.ENHANCEMENTS.NONE, cityPlace);
        Transports[(int)Transport.TYPE.CYCLE_LANE]
            = new Transport(Transport.TYPE.CYCLE_LANE, Transport.EXPANSION.NONE, Transport.ENHANCEMENTS.NONE, cityPlace);
        Transports[(int)Transport.TYPE.STREET]
            = new Transport(Transport.TYPE.STREET, Transport.EXPANSION.NONE, Transport.ENHANCEMENTS.NONE, cityPlace);

        ResetFreeSpaces();
    }
예제 #3
0
    //////////////////
    // Constructors //
    //////////////////

    public IndustrySector(float investmentValue, float developmentValue, CityPart.PLACE cityPlace, City city)
    {
        this.city   = city;
        CityPlace   = cityPlace;
        Development = new ConditionableIndex("Riqueza", "Nivel de riqueza de los trabajadores en el barrio "
                                             + Global.Names.cityPart[(int)cityPlace], developmentValue);
        Investment = new ConditionableIndex("Inversión", "Nivel de inversión dirigida a los oficios en el barrio "
                                            + Global.Names.cityPart[(int)cityPlace], investmentValue);

        jobsCount = Enum.GetNames(typeof(Job.TYPE)).Length;
        Jobs      = new Job[jobsCount];

        Jobs[(int)Job.TYPE.POLICEMAN]
            = new Job(Job.TYPE.POLICEMAN, Job.EXTENSION.NORMAL, Job.TIME_DEMAND.FULL_TIME, Job.DURATION.STANDARD, cityPlace);
        Jobs[(int)Job.TYPE.DOCTOR]
            = new Job(Job.TYPE.DOCTOR, Job.EXTENSION.NORMAL, Job.TIME_DEMAND.FULL_TIME, Job.DURATION.STANDARD, cityPlace);
        Jobs[(int)Job.TYPE.CLEANER]
            = new Job(Job.TYPE.CLEANER, Job.EXTENSION.NORMAL, Job.TIME_DEMAND.FULL_TIME, Job.DURATION.STANDARD, cityPlace);
        Jobs[(int)Job.TYPE.SUBWAY_WORKER]
            = new Job(Job.TYPE.SUBWAY_WORKER, Job.EXTENSION.NORMAL, Job.TIME_DEMAND.FULL_TIME, Job.DURATION.STANDARD, cityPlace);
        Jobs[(int)Job.TYPE.OFFICE_WORKER]
            = new Job(Job.TYPE.OFFICE_WORKER, Job.EXTENSION.NORMAL, Job.TIME_DEMAND.FULL_TIME, Job.DURATION.STANDARD, cityPlace);
        Jobs[(int)Job.TYPE.EXECUTIVE_OFFICER]
            = new Job(Job.TYPE.EXECUTIVE_OFFICER, Job.EXTENSION.NORMAL, Job.TIME_DEMAND.FULL_TIME, Job.DURATION.STANDARD, cityPlace);

        InitiallizeWorkOffers();
    }
예제 #4
0
파일: Job.cs 프로젝트: Phireh/VEUS
    //////////////////////
    // Auxiliar Methods //
    //////////////////////

    void SetInitialValues(TYPE jobType, int quantity, int salary, int contractedDays, JobSchedule schedule,
                          float requieredEffortValue, EXTENSION extension, TIME_DEMAND timeDemand, DURATION duration, CityPart.PLACE cityPlace)
    {
        CityPlace       = cityPlace;
        JobType         = jobType;
        this.extension  = extension;
        this.timeDemand = timeDemand;
        this.duration   = duration;
        Salary          = salary;
        Quantity        = quantity;
        ContractedDays  = contractedDays;
        Schedule        = schedule;
        RequieredEffort = new ConditionableIndex("Esfuerzo Requerido", "Representacuanto esfuerzo ers necesario para ser "
                                                 + Global.Names.jobs[(int)jobType] + " en el barrio " + Global.Names.cityPart[(int)cityPlace], requieredEffortValue);
    }
예제 #5
0
    //////////////////
    // Constructors //
    //////////////////

    public LeisureSector(float investmentValue, float funValue, CityPart.PLACE cityPlace)
    {
        CityPlace = cityPlace;
        Fun       = new ConditionableIndex("Diversión", "Nivel de diversión de los lugares de ocio en el barrio "
                                           + Global.Names.cityPart[(int)cityPlace], funValue);
        Investment = new ConditionableIndex("Inversión", "Nivel de inversión dirigida a los lugares de ocio en el barrio "
                                            + Global.Names.cityPart[(int)cityPlace], investmentValue);

        placesCoount  = Enum.GetNames(typeof(Leisure.PLACE)).Length;
        LeisureVenues = new Leisure[placesCoount];

        LeisureVenues[(int)Leisure.PLACE.DISCO]  = new Leisure(Leisure.PLACE.DISCO, Leisure.AVAILABILITY.NORMAL, cityPlace);
        LeisureVenues[(int)Leisure.PLACE.CINEMA] = new Leisure(Leisure.PLACE.CINEMA, Leisure.AVAILABILITY.NORMAL, cityPlace);
        LeisureVenues[(int)Leisure.PLACE.PARK]   = new Leisure(Leisure.PLACE.PARK, Leisure.AVAILABILITY.NORMAL, cityPlace);
        LeisureVenues[(int)Leisure.PLACE.GYM]    = new Leisure(Leisure.PLACE.GYM, Leisure.AVAILABILITY.NORMAL, cityPlace);
    }