Releases: CodebreakerApp/Codebreaker.Xaml
v4.0.0-preview.1.42-viewmodels-lib
What's Changed
- Added shape to VM by @szv in #191
- Update NuGet build by @christiannagel in #193
Full Changelog: v3.7-beta.49-viewmodels...v4.0.0-preview1.42-viewmodels-lib
v3.7.0-beta.40-viewmodels
What's Changed
Full Changelog: v3.7-beta.38-viewmodels...v3.7-beta.49-viewmodels
Release Summary
This version includes several significant changes to the game functionality in the Codebreaker project. The main focus of these changes is to introduce the ability to cancel a game and handle the associated scenarios.
Package Update
The CNinnovation.Codebreaker.GamesClient package in Codebreaker.ViewModels.csproj was updated from 3.6.0-beta.21 to 3.6.0-beta.24. This update is necessary to keep the project up-to-date with the latest features and improvements of the package.
New Class and Method
A new class GameCancelledMessage was added to GameCancelledMessage.cs. This class is used to send a message when a game is cancelled.
In GamePageViewModel.cs, a new method CanCancelGame was added. This method checks if a game can be cancelled by verifying that the game is not null and not finished. This is a crucial check to prevent any unwanted behavior or errors.
Game Cancellation
A new RelayCommand attribute was added to a new method CancelGameAsync. This method is responsible for cancelling the game if it is not null. If the game is null, it throws an InvalidOperationException, ensuring that the game exists before attempting to cancel it.
The CancelGameAsync method also handles different scenarios that might occur during the cancellation process. If the game cannot be cancelled due to a BadRequest HTTP status code, it shows an info bar message "Could not cancel the game". If there are networking issues, it shows an info bar message "Networking issues". These messages provide feedback to the user about the status of the cancellation process.
After successfully cancelling the game, the method sets the game to null and sends a GameCancelledMessage. This design decision ensures that the game state is properly reset after cancellation and that other parts of the application are notified about the cancellation.
v3.7.0-beta.38-viewmodels
What's Changed
- ViewModel refactoring and simplification by @szv in #174
- Fixed and enhanced ViewModel tests by @szv in #175
Full Changelog: v3.6.0-beta.34-viewmodels...v3.7-beta.38-viewmodels
Major Changes
-
Package Update: The
Microsoft.Extensions.Optionspackage was updated from7.0.1to8.0.2. -
Class Removals: Several classes were removed, including
GameViewModel,MoveViewModel,GamePageViewModelOptions,GameMode,GameMoveValue,SelectionAndKeyPegs,GameStateChangedMessage, andGameMoveMessage. -
Class Additions: New classes were added, including
GameEndedMessage,GameStartedMessage,MakeMoveMessage,Field,Game, andMove. -
Refactoring of
GamePageViewModel: This class was refactored to remove dependencies onIDialogServiceandIOptions<GamePageViewModelOptions>, and to add dependencies onIGamesClientandIInfoBarService. TheStartGameAsyncandSetMoveAsyncmethods were also refactored. -
Refactoring of
GameandMoveclasses: TheGameclass was refactored to change theGameIdproperty toId, to add theIsFinishedproperty, and to change theFieldValuesandMovesproperties fromICollectiontoObservableCollection. TheMoveclass was refactored to remove theMoveIdandMoveNumberproperties, and to change theGuessPegsandKeyPegsproperties fromObservableCollectiontoICollection.
Design Decisions
The refactoring of the GamePageViewModel, Game, and Move classes was done to simplify the codebase and improve maintainability. The removal of certain classes and properties, and the addition of others, was done to streamline the game logic and make it more intuitive. The change in dependencies for GamePageViewModel was made to improve the class's testability and decouple it from specific services. The changes in property types from ICollection to ObservableCollection (and vice versa) were made to better reflect the nature of the data being handled.
v3.6.0-beta.34-viewmodels
What's Changed
- bump client lib by @christiannagel in #151
Full Changelog: v3.5.0-beta.33-viewmodels...v3.6.0-beta.34-viewmodels
v3.5.0-beta.33-viewmodels
What's Changed
Full Changelog: v3.5.0-beta.32-viewmodels...v3.5.0-beta.33-viewmodels
v3.5.0-beta.32-viewmodels
What's Changed
- Bump xunit.runner.visualstudio from 2.5.3 to 2.5.5 by @dependabot in #79
- Bump actions/setup-dotnet from 3 to 4 by @dependabot in #80
- Fixed HasAction property by @szv in #89
Full Changelog: v3.5.0-beta.29-viewmodels...v3.5.0-beta.32-viewmodels
v3.5.0-beta.29-viewmodels
What's Changed
- 43 mvvm lib updateclientlib by @christiannagel in #44
- 57 viewmodels infobar by @szv in #65
- Fixed VM test by @szv in #78
Full Changelog: v3.5.0-beta.22-viewmodels...v3.5.0-beta.29-viewmodels
Codebreaker.ViewModels 3.5.0-beta.22
What's Changed
- Initial beta version for Codebreaker Games API v3 #14 by @christiannagel
Version 2
Version 2 of the XAML clients source code