CNInnovation.Codebreaker.ViewModels 3.7.0-beta.40

This is a prerelease version of CNInnovation.Codebreaker.ViewModels.
dotnet add package CNInnovation.Codebreaker.ViewModels --version 3.7.0-beta.40                
NuGet\Install-Package CNInnovation.Codebreaker.ViewModels -Version 3.7.0-beta.40                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CNInnovation.Codebreaker.ViewModels" Version="3.7.0-beta.40" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CNInnovation.Codebreaker.ViewModels --version 3.7.0-beta.40                
#r "nuget: CNInnovation.Codebreaker.ViewModels, 3.7.0-beta.40"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CNInnovation.Codebreaker.ViewModels as a Cake Addin
#addin nuget:?package=CNInnovation.Codebreaker.ViewModels&version=3.7.0-beta.40&prerelease

// Install CNInnovation.Codebreaker.ViewModels as a Cake Tool
#tool nuget:?package=CNInnovation.Codebreaker.ViewModels&version=3.7.0-beta.40&prerelease                

CNinnovation.Codebreaker.ViewModels

This library contains view-model types for XAML-based applications (WinUI, WPF, .NET MAUI...) to create Codebreaker games.

It is part of the Codebreaker solution.

See https://github.com/codebreakerapp for more information on the complete solution.

The ViewModels

GamePageViewModel

The GamePageViewModel is the view-model type for the game page with commands to start games, set moves.
The GamePageViewModel is the main view-model type to communicate with the application.

Members Description
ctor Needs IGamesClient (communication with the games-service API), IInfoBarService
Game The current game
IsLoading Indicates processing activitiy, where showing a loading indicator is appropriate
SelectedFields The fields used for selecting the colors for the next move
Username The username of the player. This name is used when starting the game
StartGameCommand Command to start a new game
MakeMoveCommand Command to set a move

Model types

The following model types are used to contain information about the game.

Game

Members Description
Id The ID of the game
GameType The type of the game
PlayerName The name of the player
StartTime The start time of the game
EndTime The end time of the game
Duration The duration of the game
NumberCodes The number of codes in the game
MaxMoves The maximum number of moves allowed
IsFinished Indicates if the game is finished
IsVictory Indicates if the game is a victory
FieldValues The values of the fields
Moves The moves made in the game

Move

Members Description
GuessPegs The guess pegs from the user for this move
KeyPegs The result from the analyer for this move based on the associated game that contains the move. (Null if the move was not analyzed yet.)

Field

Members Description
PossibleColors The possible colors for the field
Color The selected color for the field

Services

IInfoBarService / InfoBarService

Service to show messages in the info bar.
The UI is able to bind to the Messages-ObservableCollection for displaying the mssages.

// Register the service in the platform-specific project
services.AddScoped<IInfoBarService, InfoBarService>();

INavigationService

Interface for the service to navigate between pages.
The implementation for this interface needs to be made by the platform-specific project.

// Register the service in the platform-specific project
services.AddScoped<INavigationService, MyPlatformSpecificNavigationServiceImplementation>();
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.7.0-beta.40 54 4/10/2024
3.7.0-beta.38 56 3/20/2024
3.6.0-beta.34 81 2/12/2024
3.5.0-beta.33 130 12/19/2023