Skip to content

Commit

Permalink
small clear
Browse files Browse the repository at this point in the history
  • Loading branch information
strakam committed Sep 20, 2024
1 parent 39498e4 commit c219051
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
5 changes: 0 additions & 5 deletions generals/rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def __init__(self, game: game.Game):
self.agent_fov = {name: True for name in self.agents}
self.game_speed = 1
self.paused = True
self.changed = True
self.clock = pygame.time.Clock()
self.last_render_time = time.time()

Expand Down Expand Up @@ -83,9 +82,6 @@ def handle_events(self):
pygame.quit()
quit()
if event.type == pygame.KEYDOWN:
self.changed = True
control_events["changed"] = True

# Speed up game right arrow is pressed
if event.key == pygame.K_RIGHT and not self.paused:
self.game_speed = max(1 / 16, self.game_speed / 2)
Expand Down Expand Up @@ -197,7 +193,6 @@ def render_gui(self, from_replay=False):
self.scoreboard.blit(
text, (self.window_width - 3 * c.GUI_CELL_WIDTH + x_offset, y_offset)
)
self.changed = False
self.screen.blit(self.scoreboard, (0, 0))

def render_grid(self):
Expand Down
1 change: 0 additions & 1 deletion generals/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from generals.config import PASSABLE, MOUNTAIN
from generals.config import GameConfig
from copy import deepcopy
from generals.agents import Agent

from typing import List, Dict, Tuple

Expand Down

0 comments on commit c219051

Please sign in to comment.