CNInnovation.Codebreaker.ViewModels
3.7.0-beta.40
Prefix Reserved
dotnet add package CNInnovation.Codebreaker.ViewModels --version 3.7.0-beta.40
NuGet\Install-Package CNInnovation.Codebreaker.ViewModels -Version 3.7.0-beta.40
<PackageReference Include="CNInnovation.Codebreaker.ViewModels" Version="3.7.0-beta.40" />
<PackageVersion Include="CNInnovation.Codebreaker.ViewModels" Version="3.7.0-beta.40" />
<PackageReference Include="CNInnovation.Codebreaker.ViewModels" />
paket add CNInnovation.Codebreaker.ViewModels --version 3.7.0-beta.40
#r "nuget: CNInnovation.Codebreaker.ViewModels, 3.7.0-beta.40"
#:package CNInnovation.Codebreaker.ViewModels@3.7.0-beta.40
#addin nuget:?package=CNInnovation.Codebreaker.ViewModels&version=3.7.0-beta.40&prerelease
#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 | Versions 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net7.0
- CNinnovation.Codebreaker.GamesClient (>= 3.6.0-beta.24)
- CommunityToolkit.Mvvm (>= 8.2.2)
- Microsoft.Extensions.Options (>= 8.0.2)
-
net8.0
- CNinnovation.Codebreaker.GamesClient (>= 3.6.0-beta.24)
- CommunityToolkit.Mvvm (>= 8.2.2)
- Microsoft.Extensions.Options (>= 8.0.2)
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 | 132 | 4/10/2024 |
| 3.7.0-beta.38 | 108 | 3/20/2024 |
| 3.6.0-beta.34 | 138 | 2/12/2024 |
| 3.5.0-beta.33 | 178 | 12/19/2023 |