Skip to content

Commit

Permalink
Config margins (#47)
Browse files Browse the repository at this point in the history
* Fix merge (#46)

* Fix Merge

* Update config.py

* added margins

* Update config.py

---------

Co-authored-by: Jean A. Eckelberg <[email protected]>
  • Loading branch information
JuliaCaesar and JeanAEckelberg authored Jun 3, 2023
1 parent 3b2690e commit 024db90
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
10 changes: 10 additions & 0 deletions Visualiser2/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class Config:
__SCREEN_SIZE: Vector = Vector(x=1366, y=768) # width, height
__FRAME_RATE: int = 4
__BACKGROUND_COLOR: (int, int, int) = 0, 0, 0
__GAME_BOARD_MARGIN_LEFT = 200
__GAME_BOARD_MARGIN_TOP = 200

# if you have an animation, this will be the number of frames the animation goes through for each turn
@property
Expand Down Expand Up @@ -39,3 +41,11 @@ def FRAME_RATE(self) -> int:
@property
def BACKGROUND_COLOR(self) -> (int, int, int):
return self.__BACKGROUND_COLOR

@property
def GAME_BOARD_MARGIN_LEFT(self) -> int:
return self.__GAME_BOARD_MARGIN_LEFT

@property
def GAME_BOARD_MARGIN_TOP(self) -> int:
return self.__GAME_BOARD_MARGIN_TOP
5 changes: 1 addition & 4 deletions game/controllers/master_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,7 @@ def turn_logic(self, clients: list[Player], turn):
self.movement_controller.handle_actions(client.actions[i], client, self.current_world_data["game_board"])
except IndexError:
pass
try:
self.interact_controller.handle_actions(client.actions[i], client, self.current_world_data["game_board"])
except IndexError:
pass

# checks event logic at the end of round
# self.handle_events(clients)

Expand Down
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tqdm~=4.65.0
pygame~=2.3.0
numpy~=1.24.2
Pillow~=9.5.0

0 comments on commit 024db90

Please sign in to comment.