You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance activity logging and add game reveal functionality
Updated `ActivityExtensions.cs` to replace `ActivityTagsCollection` with an array of `KeyValuePair<string, object?>` for event tags. Introduced a new `GameRevealedEvent` method for logging game reveal events.
Added `RevealGameAsync` method in `GamesClient.cs` to cancel a game and retrieve its details, with improved error handling and logging. Updated event logging for game moves to include tags.
Expanded `IGamesClient.cs` with XML documentation for the new method and marked `CancelGameAsync` as obsolete.
Enhanced logging capabilities in `LogExtensions.cs` with a new method for revealing game errors.
Updated `readme.md` to reflect new functionality and provide usage examples for `RevealGameAsync`.
/// Set a game move by supplying guess pegs. This method returns the results of the move (the key pegs), and whether the game ended, and whether the game was won.
Copy file name to clipboardExpand all lines: src/clients/Codebreaker.GameAPIs.Client/docs/readme.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ The `IGamesClient` class is the main contract to be used for communication to pl
16
16
|`SetMoveAsync`| Set guesses for a game move |
17
17
|`GetGameAsync`| Get a game by id with all details and moves |
18
18
|`GetGamesAsync`| Get a list of games with all details and moves (use the `GamesQuery` class to define the filter) |
19
-
19
+
|`RevealGameAsync`| Ends a game and returns the correct answer |
20
20
21
21
The `GamesClient` class implements the `IGamesClient` interface. In the constructor, inject the `HttpClient` class. You can use `Microsoft.Extensions.Http` to configure the `HttpClient` class.
The returned fieldValues contains an array of possible values for code fields, with the key being "colors". With a Game5x5x4 game, the returned fieldValues contains a key "shapes", and a key "colors".
0 commit comments