Esempio n. 1
0
    def get_surface(self):
        tile_size = self.tile_size
        pygame = self.pygame
        self.rects.clear()

        map_surface = pygame.Surface((62*tile_size, 38*tile_size))

        # Draw the sidewalks
        street_horiz = Sprite('Resources/street_horizontal', (0,0), (10,2))
        street_vert = Sprite('Resources/street_vertical', (0,0), (2,10))
        street_hub = Sprite('Resources/street_hub', (0,0), (2,2))

        # Draw the horizontal streets
        y = 0
        for row in range(4):
            x = 2*tile_size
            for col in range(5):
                map_surface.blit(street_horiz.surface, (x,y))

                x+=12*tile_size
            y+=12*tile_size

        # Draw the vertical streets
        y = 2*tile_size
        for row in range(3):
            x=0
            for col in range(6):
                map_surface.blit(street_vert.surface, (x,y))
                x+=12*tile_size
            y+=12*tile_size

        # Draw the hubs
        y = 0
        for row in range(4):
            x=0
            for col in range(6):
                map_surface.blit(street_hub.surface, (x,y))
                x+=12*tile_size
            y+=12*tile_size

        # Draw grid of sprites
        y = 2*tile_size
        for row in self.map:
            x = 2*tile_size
            for building in row:
                # Draw the building
                map_surface.blit(building.sprite.surface, (x,y))
                self.rects.append((Rect(x, y, 10 * tile_size, 10 * tile_size), building))
                # Move x, leaving room from the road between the buidlings
                x += 12*tile_size
            y += 12*tile_size

        return map_surface
Esempio n. 2
0
 def __init__(self):
     super().__init__()
     self.constructionCost = 20000
     self.constructionTime = 4
     self.finances = Finance()
     self.name = "Dining Hall"
     self.effects = "The Dining Hall is where students eat.  Adding or upgrading a lecture hall increases universities student morale and reputation."
     self.sprite = Sprite('Resources/dininghall', (0, 0), (10, 10))
Esempio n. 3
0
 def __init__(self, months, pos, name):
     super().__init__()
     self.name = name
     self.counter = months
     self.effects = [
         name + " will be ", "completed in ",
         str(months) + " months"
     ]
     self.future = None
     self.pos = pos
     self.sprite = Sprite('Resources/construction', (0, 0), (10, 10))
Esempio n. 4
0
 def __init__(self):
     super().__init__()
     self.constructionCost = 60000
     self.constructionTime = 8
     self.maxLevel = 3
     self.reputation = 0.075
     self.morale = 0.15
     self.graduationRate = 0
     self.involvement = 0.15
     self.tuition = 0
     self.enrollment = 10
     self.maxEnrollment = 0
     self.professors = 0
     self.enable = True
     self.effects = "The Stadium is a place students can go to get involved in different activities. " \
                    "Adding or upgrading the student union increases the universities reputation, morale, involvement and enrollment."
     self.name = "Stadium"
     self.sprite = Sprite('Resources/stadium', (0, 0), (10, 10))
Esempio n. 5
0
 def __init__(self):
     super().__init__()
     self.constructionCost = 60000
     self.constructionTime = 7
     self.maxLevel = 3
     self.reputation = 0.125
     self.morale = 0
     self.graduationRate = 0.075
     self.involvement = 0.075
     self.tuition = 0
     self.enable = True
     self.enrollment = 2
     self.teachers = 2
     self.maxEnrollment = 0
     self.professors = 5
     self.name = "Research Lab"
     self.effects = "The research lab gives students a place to research. Adding or upgrading a research lab increases  reputation, student morale, and graduation rate."
     self.sprite = Sprite('Resources/researchlab', (0, 0), (10, 10))
Esempio n. 6
0
    def __init__(self):
        super().__init__()
        self.constructionCost = 25000
        self.maxLevel = 3
        self.constructionTime = 5
        self.reputation = 0.05
        self.morale = 0.05
        self.graduationRate = 0.1
        self.involvement = 0
        self.tuition = 0
        self.enrollment = 3
        self.enable = True
        self.maxEnrollment = 0
        self.professors = 0
        self.name = "Library"
        self.effects = "The library is where students at your university will study. Adding or upgrading a library increases \
                   universities reputation, student morale, and graduation rate."

        self.sprite = Sprite('Resources/library', (0, 0), (10, 10))
Esempio n. 7
0
 def __init__(self):
   super().__init__()
   self.constructionCost = 10000
   self.constructionTime = 4
   self.finances = Finance()
   self.maxLevel = 3
   self.reputation = 0
   self.morale = 0
   self.graduationRate = 0
   self.involvement = 0
   self.tuition = 0
   self.enrollment = 0
   self.enable = True
   self.maxEnrollment = 20
   self.capacity = 20
   self.professors = 0
   self.effects = "Student Housing is where the students stay while they are going to the university."\
                  " Student Housing increases max enrollment."
   self.name = "Student Housing"
   self.sprite = Sprite('Resources/studenthousing', (0,0), (10,10))
Esempio n. 8
0
    def __init__(self):
        super().__init__()
        self.constructionCost = 10000
        self.constructionTime = 4
        self.maxLevel = 3
        self.level = 1
        self.reputation = 0.05
        self.morale = 0.05
        self.graduationRate = 0.05
        self.involvement = 0
        self.tuition = 0
        self.enrollment = 10
        self.maxEnrollment = 0
        self.teachers = 2
        self.enable = True
        self.name = "Lecture Hall"
        self.lectureType = "Arts and Sciences"
        self.effects = "The Lecture Hall is where classes take place. Adding or upgrading a lecture hall increases \
                   universities reputation, student morale, graduation rate, and professors"

        self.sprite = Sprite('Resources/lecturehall', (0, 0), (10, 10))
Esempio n. 9
0
 def __init__(self, pos):
     super().__init__()
     self.constructionCost = 0
     self.name = "Empty Lot"
     self.pos = pos
     self.sprite = Sprite('Resources/emptylot', (0,0), (10,10))