Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config margins #47

Merged
merged 5 commits into from
Jun 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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