Skip to content

Releases: CodebreakerApp/Codebreaker.Xaml

v4.0.0-preview.1.42-viewmodels-lib

12 Jul 13:13
02de39c
Compare
Choose a tag to compare
Pre-release

What's Changed

Full Changelog: v3.7-beta.49-viewmodels...v4.0.0-preview1.42-viewmodels-lib

v3.7.0-beta.40-viewmodels

10 Apr 08:33
088fb90
Compare
Choose a tag to compare
Pre-release

What's Changed

  • 177 nuget packaged readme file by @szv in #178
  • Added CancelGameCommand to VM by @szv in #181

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

20 Mar 19:03
e4c23a4
Compare
Choose a tag to compare
Pre-release

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

  1. Package Update: The Microsoft.Extensions.Options package was updated from 7.0.1 to 8.0.2.

  2. Class Removals: Several classes were removed, including GameViewModel, MoveViewModel, GamePageViewModelOptions, GameMode, GameMoveValue, SelectionAndKeyPegs, GameStateChangedMessage, and GameMoveMessage.

  3. Class Additions: New classes were added, including GameEndedMessage, GameStartedMessage, MakeMoveMessage, Field, Game, and Move.

  4. Refactoring of GamePageViewModel: This class was refactored to remove dependencies on IDialogService and IOptions<GamePageViewModelOptions>, and to add dependencies on IGamesClient and IInfoBarService. The StartGameAsync and SetMoveAsync methods were also refactored.

  5. Refactoring of Game and Move classes: The Game class was refactored to change the GameId property to Id, to add the IsFinished property, and to change the FieldValues and Moves properties from ICollection to ObservableCollection. The Move class was refactored to remove the MoveId and MoveNumber properties, and to change the GuessPegs and KeyPegs properties from ObservableCollection to ICollection.

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

12 Feb 15:18
090e835
Compare
Choose a tag to compare
Pre-release

What's Changed

Full Changelog: v3.5.0-beta.33-viewmodels...v3.6.0-beta.34-viewmodels

v3.5.0-beta.33-viewmodels

19 Dec 18:35
e273d26
Compare
Choose a tag to compare
Pre-release

What's Changed

  • 92 animations and infomessages by @szv in #93

Full Changelog: v3.5.0-beta.32-viewmodels...v3.5.0-beta.33-viewmodels

v3.5.0-beta.32-viewmodels

19 Dec 14:15
ef82925
Compare
Choose a tag to compare
Pre-release

What's Changed

Full Changelog: v3.5.0-beta.29-viewmodels...v3.5.0-beta.32-viewmodels

v3.5.0-beta.29-viewmodels

11 Dec 16:57
e21095d
Compare
Choose a tag to compare
Pre-release

What's Changed

Full Changelog: v3.5.0-beta.22-viewmodels...v3.5.0-beta.29-viewmodels

Codebreaker.ViewModels 3.5.0-beta.22

05 Aug 18:08
Compare
Choose a tag to compare
Pre-release

What's Changed

Version 2

03 Aug 11:08
6e9075f
Compare
Choose a tag to compare
Version 2 Pre-release
Pre-release

Version 2 of the XAML clients source code