added dump
This commit is contained in:
parent
d7742fe574
commit
a83017fc04
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
10
config.py
10
config.py
@ -18,11 +18,11 @@ MAP = {
|
||||
5: {0: "House", 1: "Road", 2: "Grass", 3: "Road", 4: "House", 5: "House", 6: "Road", 7: "Grass",
|
||||
8: "Road", 9: "Road", 10: "Road", 11: "Road", 12: "Road", 13: "Grass", 14: "Road", 15: "House"},
|
||||
6: {0: "House", 1: "Road", 2: "Grass", 3: "Road", 4: "House", 5: "House", 6: "Road", 7: "Grass",
|
||||
8: "Road", 9: "House", 10: "House", 11: "House", 12: "Road", 13: "Grass", 14: "Road", 15: "House"},
|
||||
8: "Grass", 9: "Grass", 10: "Road", 11: "Grass", 12: "Grass", 13: "Grass", 14: "Road", 15: "House"},
|
||||
7: {0: "House", 1: "Road", 2: "Grass", 3: "Road", 4: "Road", 5: "Road", 6: "Road", 7: "Grass",
|
||||
8: "Road", 9: "House", 10: "Grass", 11: "House", 12: "Road", 13: "Grass", 14: "Road", 15: "House"},
|
||||
8: "Grass", 9: "Grass", 10: "Road", 11: "Grass", 12: "Grass", 13: "Grass", 14: "Road", 15: "House"},
|
||||
8: {0: "House", 1: "Road", 2: "Grass", 3: "Road", 4: "House", 5: "House", 6: "Road", 7: "Grass",
|
||||
8: "Road", 9: "House", 10: "Grass", 11: "House", 12: "Road", 13: "Grass", 14: "Road", 15: "House"},
|
||||
9: {0: "House", 1: "Road", 2: "Road", 3: "Road", 4: "House", 5: "House", 6: "Road", 7: "Road",
|
||||
8: "Road", 9: "House", 10: "Grass", 11: "House", 12: "Road", 13: "Road", 14: "Road", 15: "House"},
|
||||
8: "Grass", 9: "Plastic", 10: "Road", 11: "Paper", 12: "Grass", 13: "Grass", 14: "Road", 15: "House"},
|
||||
9: {0: "House", 1: "Road", 2: "Road", 3: "Road", 4: "House", 5: "House", 6: "Road", 7: "Grass",
|
||||
8: "Grass", 9: "Grass", 10: "Glass", 11: "Grass", 12: "Grass", 13: "Grass", 14: "Road", 15: "House"},
|
||||
}
|
||||
|
11
helpler.py
11
helpler.py
@ -2,6 +2,9 @@ from config import MAP
|
||||
from models.Road import Road
|
||||
from models.Grass import Grass
|
||||
from models.House import House
|
||||
from models.Trash_Glass import Trash_Glass
|
||||
from models.Trash_Paper import Trash_Paper
|
||||
from models.Trash_Plastic import Trash_Plastic
|
||||
|
||||
|
||||
def Render_Element(x, y):
|
||||
@ -12,5 +15,9 @@ def Render_Element(x, y):
|
||||
return Grass(x, y)
|
||||
elif item == "House":
|
||||
return House(x, y)
|
||||
elif item == "Factory":
|
||||
pass
|
||||
elif item == "Glass":
|
||||
return Trash_Glass(x, y)
|
||||
elif item == "Paper":
|
||||
return Trash_Paper(x, y)
|
||||
elif item == "Plastic":
|
||||
return Trash_Plastic(x, y)
|
||||
|
@ -2,10 +2,10 @@ import pygame
|
||||
from config import CELL_SIZE
|
||||
|
||||
|
||||
class Dump (pygame.sprite.Sprite):
|
||||
class Trash_Glass (pygame.sprite.Sprite):
|
||||
def __init__(self, x, y):
|
||||
pygame.sprite.Sprite.__init__(self)
|
||||
self.rect = pygame.Rect(
|
||||
x * CELL_SIZE, y * CELL_SIZE, CELL_SIZE, CELL_SIZE)
|
||||
self.image = pygame.transform.scale(pygame.image.load(
|
||||
"Resources/Images/dump.jpg"), (CELL_SIZE, CELL_SIZE))
|
||||
"Resources/Images/trash-glass.png"), (CELL_SIZE, CELL_SIZE))
|
11
models/Trash_Paper.py
Normal file
11
models/Trash_Paper.py
Normal file
@ -0,0 +1,11 @@
|
||||
import pygame
|
||||
from config import CELL_SIZE
|
||||
|
||||
|
||||
class Trash_Paper (pygame.sprite.Sprite):
|
||||
def __init__(self, x, y):
|
||||
pygame.sprite.Sprite.__init__(self)
|
||||
self.rect = pygame.Rect(
|
||||
x * CELL_SIZE, y * CELL_SIZE, CELL_SIZE, CELL_SIZE)
|
||||
self.image = pygame.transform.scale(pygame.image.load(
|
||||
"Resources/Images/trash-paper.png"), (CELL_SIZE, CELL_SIZE))
|
11
models/Trash_Plastic.py
Normal file
11
models/Trash_Plastic.py
Normal file
@ -0,0 +1,11 @@
|
||||
import pygame
|
||||
from config import CELL_SIZE
|
||||
|
||||
|
||||
class Trash_Plastic (pygame.sprite.Sprite):
|
||||
def __init__(self, x, y):
|
||||
pygame.sprite.Sprite.__init__(self)
|
||||
self.rect = pygame.Rect(
|
||||
x * CELL_SIZE, y * CELL_SIZE, CELL_SIZE, CELL_SIZE)
|
||||
self.image = pygame.transform.scale(pygame.image.load(
|
||||
"Resources/Images/trash-plastic.png"), (CELL_SIZE, CELL_SIZE))
|
Loading…
Reference in New Issue
Block a user