|
|
@ -1,4 +1,5 @@
|
|
|
|
using CoreLibrary.Exceptions;
|
|
|
|
using CoreLibrary.Exceptions;
|
|
|
|
|
|
|
|
using System.Runtime.Serialization;
|
|
|
|
using System.Security.Cryptography;
|
|
|
|
using System.Security.Cryptography;
|
|
|
|
|
|
|
|
|
|
|
|
namespace CoreLibrary.Core
|
|
|
|
namespace CoreLibrary.Core
|
|
|
@ -6,22 +7,29 @@ namespace CoreLibrary.Core
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Classe représentant un plateau de jeu composé de codes et leurs indicateurs ainsi que les méthodes associées.
|
|
|
|
/// Classe représentant un plateau de jeu composé de codes et leurs indicateurs ainsi que les méthodes associées.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
[DataContract]
|
|
|
|
public class Plateau
|
|
|
|
public class Plateau
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
[DataMember]
|
|
|
|
private readonly Code codeSecret;
|
|
|
|
private readonly Code codeSecret;
|
|
|
|
|
|
|
|
[DataMember]
|
|
|
|
private readonly Code?[] grille;
|
|
|
|
private readonly Code?[] grille;
|
|
|
|
|
|
|
|
[DataMember]
|
|
|
|
private readonly IEnumerable<Indicateur>[] indicateurs;
|
|
|
|
private readonly IEnumerable<Indicateur>[] indicateurs;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[DataMember]
|
|
|
|
private readonly int tailleCode;
|
|
|
|
private readonly int tailleCode;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Le numéro de tour actuel.
|
|
|
|
/// Le numéro de tour actuel.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
[DataMember]
|
|
|
|
public int Tour { get; private set; } = 1;
|
|
|
|
public int Tour { get; private set; } = 1;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// La victoire du joueur, True si le joueur a gagné sinon False
|
|
|
|
/// La victoire du joueur, True si le joueur a gagné sinon False
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
[DataMember]
|
|
|
|
public bool Victoire { get; private set; } = false;
|
|
|
|
public bool Victoire { get; private set; } = false;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|