Check for Dirt vs wall collisions

This commit is contained in:
steffen-illium
2021-05-18 10:01:56 +02:00
parent 02cc90c559
commit f90889ef42
2 changed files with 19 additions and 11 deletions

View File

@@ -1,4 +1,3 @@
import numpy as np
import pygame
from pathlib import Path
@@ -66,5 +65,5 @@ class Renderer:
if __name__ == '__main__':
renderer = Renderer(fps=2, cell_size=40, assets=['wall', 'agent', 'dirt'])
for i in range(15):
renderer.render({'agent': [(5, i)], 'wall': [(0, i), (i, 0)], 'dirt': [(3,3), (3,4)]})
renderer.render({'agent': [(5, i)], 'wall': [(0, i), (i, 0)], 'dirt': [(3, 3), (3, 4)]})