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

Allow players to choose game configuration #260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marein
Copy link
Owner

@marein marein commented Dec 4, 2024

This pull requests partially introduces a new concept, the challenge - described in #123, for views. It's not introducing the whole concept explicitly, otherwise the pull request would be too big.

@marein marein self-assigned this Dec 4, 2024
subscriptions="connect-four-{{ game.id }}{{ game.chatId ? ',chat-' ~ game.chatId }}"
{% if app.environment == 'dev' %}verbose{% endif %}>
</event-source>
<script type="module">
Copy link
Owner Author

@marein marein Dec 4, 2024

Choose a reason for hiding this comment

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

Instead of this inline script, a sticky custom element should handle challenges. Basically like it was before, but a little bit more powerful, so users can navigate through the page.

@marein marein force-pushed the 259-allow-players-to-choose-game-configuration branch 28 times, most recently from c273bce to 1742016 Compare December 7, 2024 07:49
@marein marein force-pushed the 259-allow-players-to-choose-game-configuration branch 11 times, most recently from 1b6e428 to ed43298 Compare December 12, 2024 20:49
@marein marein requested a review from Copilot December 12, 2024 20:56

Choose a reason for hiding this comment

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

Copilot reviewed 10 out of 26 changed files in this pull request and generated no suggestions.

Files not reviewed (16)
  • assets/css/app.css: Language not supported
  • config/connect-four/importmap.php: Language not supported
  • src/ConnectFour/Application/Game/Command/OpenCommand.php: Language not supported
  • src/ConnectFour/Application/Game/Command/OpenHandler.php: Language not supported
  • src/ConnectFour/Domain/Game/Board/Size.php: Language not supported
  • src/ConnectFour/Domain/Game/Board/Stone.php: Language not supported
  • src/ConnectFour/Domain/Game/Configuration.php: Language not supported
  • src/ConnectFour/Domain/Game/Event/GameAborted.php: Language not supported
  • src/ConnectFour/Domain/Game/Event/GameOpened.php: Language not supported
  • src/ConnectFour/Domain/Game/Event/PlayerJoined.php: Language not supported
  • src/ConnectFour/Domain/Game/Game.php: Language not supported
  • src/ConnectFour/Domain/Game/State/Open.php: Language not supported
  • src/ConnectFour/Domain/Game/State/Running.php: Language not supported
  • src/WebInterface/Presentation/Http/ConnectFourController.php: Language not supported
  • src/WebInterface/Presentation/Http/Form/OpenType.php: Language not supported
  • src/WebInterface/Presentation/Http/PageController.php: Language not supported
Comments skipped due to low confidence (2)

config/web-interface/services/controller.yml:4

  • The '@twig' service is removed from the arguments list for the 'web-interface.page-controller'. If the controller relies on the Twig service for rendering views, this will cause runtime errors.
arguments: ['@connect-four.query-bus', '@web-interface.security']

config/web-interface/routing.yml:80

  • The removal of the '_format: json' default may cause issues if the controller expects a JSON format. Ensure the controller can handle requests without this default or re-add it if necessary.
defaults: { _format: json }
@marein marein force-pushed the 259-allow-players-to-choose-game-configuration branch 5 times, most recently from 9d131ee to 332a3ec Compare December 14, 2024 10:07
@marein marein force-pushed the 259-allow-players-to-choose-game-configuration branch 3 times, most recently from 3826e1f to f625ae7 Compare December 14, 2024 22:49
if ($width < 2 || $height < 2) {
throw new InvalidSizeException('Width and height must be greater then 1.');
}

if (($width * $height) % 2 !== 0) {
Copy link
Owner Author

@marein marein Dec 18, 2024

Choose a reason for hiding this comment

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

That logic made sense because otherwise player 1 would have more moves than player 2. However, a 9x7 board size is valid according to Wikipedia.

@marein marein force-pushed the 259-allow-players-to-choose-game-configuration branch from f625ae7 to 26f1bfc Compare January 11, 2025 11:16
@marein marein force-pushed the 259-allow-players-to-choose-game-configuration branch from 26f1bfc to 778beb6 Compare January 12, 2025 12:31
@marein marein force-pushed the 259-allow-players-to-choose-game-configuration branch 2 times, most recently from f7bccb9 to 929c7bc Compare January 24, 2025 19:41
@marein marein force-pushed the 259-allow-players-to-choose-game-configuration branch from 929c7bc to 6f5354d Compare January 25, 2025 07:38
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.

1 participant