Skip to content

Commit db4c99a

Browse files
authored
Expose more game fields via RPC (#309)
Expose width, height and chatId for the bot #122.
1 parent 537d578 commit db4c99a

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"doctrine/doctrine-migrations-bundle": "^3.3",
3838
"doctrine/migrations": "^3.7",
3939
"doctrine/orm": "^3.0",
40-
"gaming-platform/api": "^1.7",
40+
"gaming-platform/api": "^1.8",
4141
"jms/serializer": "^3.17",
4242
"marein/php-nchan-client": "^3.1",
4343
"marein/symfony-lock-doctrine-migrations-bundle": "^1.0",

composer.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ConnectFour/Port/Adapter/Messaging/RpcMessageHandler.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ private function castGamesToProtoV1Games(array $games): array
140140
return array_map(
141141
static fn(Game $game) => ConnectFourV1::createGame()
142142
->setGameId($game->gameId)
143+
->setChatId($game->chatId)
144+
->setWidth($game->width)
145+
->setHeight($game->height)
143146
->setCurrentPlayerId($game->currentPlayerId)
144147
->setMoves(
145148
array_map(

0 commit comments

Comments
 (0)