infantry -> archer -> sauron

This commit is contained in:
Weranda 2023-06-02 15:46:56 +02:00
parent b01f3e48f9
commit de3ecc0926

14
main.py
View File

@ -99,8 +99,18 @@ class Game:
y = self.infantry_ork.y y = self.infantry_ork.y
mob_image = self.infantry_ork.INFANTRY_ORK_IMG mob_image = self.infantry_ork.INFANTRY_ORK_IMG
prediction = self.prediction_road(x,y,mob_image) prediction = self.prediction_road(x,y,mob_image)
else: if prediction == "ORK_INFANTRY":
self.bfs.bfs(self.bfs.get_cell_number(x,y)) self.bfs.bfs(self.bfs.get_cell_number(x,y))
x = self.archer_ork.x
y = self.archer_ork.y
mob_image = self.archer_ork.ARCHER_ORK_IMG
prediction = self.prediction_road(x,y,mob_image)
if prediction == "ORK_ARCHER":
self.bfs.bfs(self.bfs.get_cell_number(x,y))
x = self.sauron.x
y = self.sauron.y
mob_image = self.sauron.SAURON_IMG
def prediction_road(self,x,y,mob_image): def prediction_road(self,x,y,mob_image):