Modification des espaces de noms Library
continuous-integration/drone/push Build is passing Details

master
Céleste BARBOSA 11 months ago
parent 86eae07953
commit 7a9a562d5f

@ -1,5 +1,6 @@
using CoreLibrary.Events;
using CoreLibrary;
using CoreLibrary.Joueurs;
using CoreLibrary.Core;
namespace ConsoleApp
{

@ -5,6 +5,7 @@
using ConsoleApp;
using CoreLibrary;
using CoreLibrary.Regles;
Utils.DessinerTitre();

@ -1,4 +1,4 @@
using CoreLibrary;
using CoreLibrary.Core;
namespace ConsoleApp
{

@ -1,6 +1,6 @@
using CoreLibrary.Exceptions;
namespace CoreLibrary
namespace CoreLibrary.Core
{
/// <summary>
/// Classe représentant un code composé de jetons et ses différentes méthodes.
@ -20,8 +20,8 @@ namespace CoreLibrary
/// <param name="tailleCode">La longueur du code.</param>
/// <exception cref="TailleCodeException">Levée lorsque la longueur du code spécifiée est inférieure ou égale à zéro.</exception>
public Code(int tailleCode)
{
if(tailleCode <= 0)
{
if (tailleCode <= 0)
{
throw new TailleCodeException(tailleCode);
}
@ -42,7 +42,7 @@ namespace CoreLibrary
}
lesJetons = new Jeton?[jetons.Count()];
foreach(Jeton jeton in jetons)
foreach (Jeton jeton in jetons)
{
AjouterJeton(jeton);
}
@ -69,11 +69,11 @@ namespace CoreLibrary
/// <exception cref="CodeVideException">Levée lorsque le code est vide.</exception>
public void SupprimerDernierJeton()
{
if(NbJetons == 0)
if (NbJetons == 0)
{
throw new CodeVideException();
}
}
lesJetons[--NbJetons] = null;
}
@ -85,13 +85,13 @@ namespace CoreLibrary
/// <exception cref="IndiceCodeException">Levée lorsque l'indice est supérieur à la taille maximale du code, inférieur à 0 ou qu'il n'y a pas de jeton à l'indice spécifié</exception>
public Jeton RecupererJeton(int indice)
{
if(indice < 0 || indice >= TailleMaximale())
throw new IndiceCodeException(indice, NbJetons-1);
if (indice < 0 || indice >= TailleMaximale())
throw new IndiceCodeException(indice, NbJetons - 1);
Jeton? jeton = lesJetons[indice];
if (!jeton.HasValue)
throw new IndiceCodeException(indice, NbJetons-1);
throw new IndiceCodeException(indice, NbJetons - 1);
return jeton.Value;
}
@ -157,10 +157,10 @@ namespace CoreLibrary
for (int i = 0; i < sesJetons.Count; ++i)
{
Jeton? sonJeton = sesJetons[i];
Jeton? sonJeton = sesJetons[i];
if (sonJeton.HasValue && mesJetons.Contains(sonJeton.Value))
{
indicateurs = indicateurs.Append(Indicateur.BONNECOULEUR).ToArray();

@ -1,4 +1,4 @@
namespace CoreLibrary
namespace CoreLibrary.Core
{
/// <summary>
/// Enumération des couleurs disponibles pour les jetons.

@ -1,4 +1,4 @@
namespace CoreLibrary
namespace CoreLibrary.Core
{
/// <summary>
/// Enumération des indicateurs disponibles pour les jetons.

@ -1,4 +1,4 @@
namespace CoreLibrary
namespace CoreLibrary.Core
{
/// <summary>
/// Structure représentant un jeton de couleur

@ -1,7 +1,7 @@
using CoreLibrary.Exceptions;
using System.Security.Cryptography;
namespace CoreLibrary
namespace CoreLibrary.Core
{
/// <summary>
/// Classe représentant un plateau de jeu composé de codes et leurs indicateurs ainsi que les méthodes associées.
@ -33,7 +33,7 @@ namespace CoreLibrary
/// <exception cref="TailleGrilleException">Levée lorsque la tailleGrille est inférieure ou égale à 0.</exception>
public Plateau(int tailleCode, int tailleGrille)
{
if(tailleCode <= 0)
if (tailleCode <= 0)
{
throw new TailleCodeException(tailleCode);
}
@ -82,14 +82,14 @@ namespace CoreLibrary
/// <exception cref="CodeIncompletException">Levée lorsque le code fourni est incomplet.</exception>
public void AjouterCode(Code code)
{
if (code.TailleMaximale() != tailleCode)
if (code.TailleMaximale() != tailleCode)
{
throw new CodeInvalideException(code.TailleMaximale(), tailleCode);
}
if (!code.EstComplet())
{
throw new CodeIncompletException();
}
if (!code.EstComplet())
{
throw new CodeIncompletException();
}
indicateurs[Tour - 1] = codeSecret.Comparer(code);

@ -1,4 +1,6 @@
namespace CoreLibrary.Events
using CoreLibrary.Core;
namespace CoreLibrary.Events
{
/// <summary>
/// Classe contenant les arguments passées en paramètre lors de l'événement AjouterCode.

@ -1,4 +1,6 @@
namespace CoreLibrary.Events
using CoreLibrary.Core;
namespace CoreLibrary.Events
{
/// <summary>
/// Classe contenant les arguments passées en paramètre lors de l'événement AjouterJeton.

@ -1,4 +1,6 @@
namespace CoreLibrary.Events
using CoreLibrary.Joueurs;
namespace CoreLibrary.Events
{
/// <summary>
/// Classe contenant les arguments passées en paramètre lors de l'événement AjouterJoueur.

@ -1,4 +1,7 @@
namespace CoreLibrary.Events
using CoreLibrary.Core;
using CoreLibrary.Joueurs;
namespace CoreLibrary.Events
{
/// <summary>
/// Classe contenant les arguments passées en paramètre lors de l'événement NouveauTour.

@ -1,4 +1,6 @@
namespace CoreLibrary.Events
using CoreLibrary.Joueurs;
namespace CoreLibrary.Events
{
/// <summary>
/// Classe contenant les arguments passées en paramètre lors de l'événement PartieTerminee.

@ -1,4 +1,6 @@
namespace CoreLibrary
using CoreLibrary.Core;
namespace CoreLibrary.Joueurs
{
/// <summary>
/// Classe représentant un joueur.

@ -1,4 +1,7 @@
using CoreLibrary.Events;
using CoreLibrary.Core;
using CoreLibrary.Events;
using CoreLibrary.Joueurs;
using CoreLibrary.Regles;
namespace CoreLibrary
{

@ -1,4 +1,7 @@
namespace CoreLibrary
using CoreLibrary.Core;
using CoreLibrary.Joueurs;
namespace CoreLibrary.Regles
{
/// <summary>
/// Interface définissant les règles du jeu.

@ -1,6 +1,8 @@
using CoreLibrary.Exceptions;
using CoreLibrary.Core;
using CoreLibrary.Exceptions;
using CoreLibrary.Joueurs;
namespace CoreLibrary
namespace CoreLibrary.Regles
{
/// <summary>
/// Classe définissant les règles classiques du jeu.
@ -30,11 +32,11 @@ namespace CoreLibrary
/// Le nombre de joueurs actuels dans le jeu.
/// </summary>
public int NbJoueurs { get => nbJoueurs; }
public int NbJoueurs { get => nbJoueurs; }
/// <summary>
/// Me nombre maximum de joueurs possibles pour le jeu.
/// </summary>
public int NbJoueursMaximum { get => 2; }

@ -1,4 +1,4 @@
using CoreLibrary;
using CoreLibrary.Core;
using CoreLibrary.Exceptions;
using Xunit;

@ -1,4 +1,4 @@
using CoreLibrary;
using CoreLibrary.Core;
using Xunit;
namespace UnitTesting

@ -1,4 +1,5 @@
using CoreLibrary;
using CoreLibrary.Core;
using CoreLibrary.Joueurs;
using Xunit;
namespace UnitTesting

@ -1,4 +1,4 @@
using CoreLibrary;
using CoreLibrary.Core;
using CoreLibrary.Exceptions;
using System.Linq;
using Xunit;

@ -1,5 +1,7 @@
using CoreLibrary;
using CoreLibrary.Core;
using CoreLibrary.Exceptions;
using CoreLibrary.Joueurs;
using CoreLibrary.Regles;
using Xunit;
namespace UnitTesting

Loading…
Cancel
Save