Skip to content

[Medium] Feature/front end 1#12

Merged
RobbieKiwi merged 12 commits into
mainfrom
feature/front-end-1
Jun 10, 2025
Merged

[Medium] Feature/front end 1#12
RobbieKiwi merged 12 commits into
mainfrom
feature/front-end-1

Conversation

@RobbieKiwi

@RobbieKiwi RobbieKiwi commented Jun 9, 2025

Copy link
Copy Markdown
Owner
  • Started simple front end implementation "Joystick" class
  • Made first attempt at plotting game state
Screenshot 2025-06-09 125305

@RobbieKiwi RobbieKiwi requested a review from RomanCantu June 9, 2025 10:56
Comment thread src/app/simple_front_end/joystick.py Outdated
engine = Engine()
self._message_handler = MessageHandler()
self._game_manager = GameManager(game_repo=game_repo, game_engine=engine, front_end=self._message_handler)
if isinstance(game_id_or_players, list):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm maybe it can be improved in the future? it is strange to ask for game_id_or_players. Also, to create a new game, we need the game settings

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's quite messy but the idea is to throw this away in one month. In a later iteration (with API etc) we will have a specialized route for starting a new game with specific settings but for this one to make it work as fast as possible. The players or gameid is basically saying either load a game or start a new one with the minimal possible info (player names)

if self.asset.asset_type is AssetType.GENERATOR:
text = "G"
elif self.asset.asset_type is AssetType.LOAD:
text = "I" if self.asset.is_ice_cream else "L"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ice cream loads show an L instead of an I when I execute the test, not sure what the problem is.
For instance:
image
print({asset.id: asset.is_ice_cream for asset in game_state.assets}) prints
{0: False, 1: False, 2: False, 3: True, 4: True, 5: True}

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm that is strange, it works well for me, when did you last pull?

SocketSide = Literal["tr", "bl"]


class SocketProvider:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a docstring to clarify what tr and bl stand for?

@RomanCantu RomanCantu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other than the ice cream assets, it seems to be working correctly. Nice UI

@RobbieKiwi RobbieKiwi merged commit 432a01d into main Jun 10, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants