diff --git a/Documentations/Instruction b/Documentations/Instruction index cf5eaac..8ba492a 100644 --- a/Documentations/Instruction +++ b/Documentations/Instruction @@ -1,24 +1,6 @@ -Passer sur git - Mono-utilisateur: - Multilangue - - Changer les thèmes et les couleurs (en option) - - jeu classique pas extreme - - Thème dark - - Jeu solo complet - - Push version sur les stores pour la semaine pro - - Rendre abstract la creation deck V - - Drag and drop + - Changer les thèmes et les couleurs (en option) V => pour l'instant thème blanc et noir - Option pour mettre/enlever le pas de 10 - - Menu de choix de partie - - Menu des règles - - Plus de com (1 mail chaque soir) - - Faire une classe règle abstraite: - - Faire une list de règle devant toute être vérifier à chaque carte joué - - Faire une list de règle devant toute être vérifier à chaque fin de tour - - Skia - - GameMaster implémentera un ModeDeJeu qui implémentera des règles du jeu - - - The game -> déposé? - avant faire fonctionner en local puis on choisira ensemble \ No newline at end of file + - Logo entre les piles (à finir de placer et de redimensionner) + - nb carte \ No newline at end of file diff --git a/TheGameExtreme.Android/Properties/AndroidManifest.xml b/TheGameExtreme.Android/Properties/AndroidManifest.xml index 41828fb..f0a1626 100644 --- a/TheGameExtreme.Android/Properties/AndroidManifest.xml +++ b/TheGameExtreme.Android/Properties/AndroidManifest.xml @@ -3,13 +3,9 @@ - - - - - - - + + + \ No newline at end of file diff --git a/TheGameExtreme.Android/Resources/Resource.designer.cs b/TheGameExtreme.Android/Resources/Resource.designer.cs index 3e31455..27e2d81 100644 --- a/TheGameExtreme.Android/Resources/Resource.designer.cs +++ b/TheGameExtreme.Android/Resources/Resource.designer.cs @@ -1,11 +1,11 @@ #pragma warning disable 1591 //------------------------------------------------------------------------------ // -// Ce code a été généré par un outil. -// Version du runtime :4.0.30319.42000 +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // -// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si -// le code est régénéré. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // //------------------------------------------------------------------------------ diff --git a/TheGameExtreme/Media/TrierImageB.png b/TheGameExtreme/Media/TrierImageB.png new file mode 100644 index 0000000..3a216ac Binary files /dev/null and b/TheGameExtreme/Media/TrierImageB.png differ diff --git a/TheGameExtreme/TheGameExtreme.csproj b/TheGameExtreme/TheGameExtreme.csproj index 3781ebb..a5ff2d1 100644 --- a/TheGameExtreme/TheGameExtreme.csproj +++ b/TheGameExtreme/TheGameExtreme.csproj @@ -44,9 +44,11 @@ + + diff --git a/TheGameExtreme/model/Card/cardType/FractionCard.cs b/TheGameExtreme/model/Card/cardType/FractionCard.cs index 266c700..62b1cc1 100644 --- a/TheGameExtreme/model/Card/cardType/FractionCard.cs +++ b/TheGameExtreme/model/Card/cardType/FractionCard.cs @@ -5,11 +5,11 @@ namespace TheGameExtreme.model.card.cardType { public static readonly string CARD_FRACTION = "FractionCard"; - private Fraction fraction; + public Fraction Fraction { get; set; } public FractionCard(Fraction value) : base(value.Result()) { - fraction = value; + Fraction = value; } public override bool rapidEffect() @@ -24,7 +24,7 @@ namespace TheGameExtreme.model.card.cardType public override string ToString() { - return fraction.ToString(); + return Fraction.ToString(); } } } diff --git a/TheGameExtreme/model/Fraction.cs b/TheGameExtreme/model/Fraction.cs index 6683fe4..f4e0ca4 100644 --- a/TheGameExtreme/model/Fraction.cs +++ b/TheGameExtreme/model/Fraction.cs @@ -13,22 +13,18 @@ namespace TheGameExtreme.model Denominateur = denominateur; } - //public int CompareTo(Fraction fraction) - //{ - // decimal d = (Numerateur / Denominateur) - (fraction.Numerateur / fraction.Denominateur); - // if (d > 0) - // { - // return 1; - // } - // else if (d < 0) - // { - // return -1; - // } - // else - // { - // return 0; - // } - //} + public bool isMultiple(Fraction fraction) + { + if (Numerateur % fraction.Numerateur == 0) + { + return true; + } + if (Denominateur % fraction.Denominateur == 0) + { + return true; + } + return false; + } public bool testDiviseurCommun(Fraction fraction) { diff --git a/TheGameExtreme/model/gameActions/classic/GameMode.cs b/TheGameExtreme/model/gameActions/classic/GameMode.cs index 32fea88..f615fb9 100644 --- a/TheGameExtreme/model/gameActions/classic/GameMode.cs +++ b/TheGameExtreme/model/gameActions/classic/GameMode.cs @@ -75,23 +75,23 @@ namespace TheGameExtreme.model.gameActions.classic { if (start < end) { - decimal pivot = ar[end].Value; + Card pivot = ar[end]; int pIndex = start; - decimal swap; + Card swap; for (int i = start; i < end; i++) { - if (ar[i].Value < pivot) + if (ar[i].Value.CompareTo(pivot.Value) < 0) { - swap = ar[pIndex].Value; - ar[pIndex].Value = ar[i].Value; - ar[i].Value = swap; + swap = ar[pIndex]; + ar[pIndex] = ar[i]; + ar[i] = swap; pIndex++; } } - ar[end].Value = ar[pIndex].Value; - ar[pIndex].Value = pivot; + ar[end] = ar[pIndex]; + ar[pIndex] = pivot; quickSort(ar, start, pIndex - 1); quickSort(ar, pIndex + 1, end); diff --git a/TheGameExtreme/model/gameActions/classic/JouerUneCarte.cs b/TheGameExtreme/model/gameActions/classic/JouerUneCarte.cs index 9c8e1e2..9f8c7f3 100644 --- a/TheGameExtreme/model/gameActions/classic/JouerUneCarte.cs +++ b/TheGameExtreme/model/gameActions/classic/JouerUneCarte.cs @@ -52,7 +52,7 @@ namespace TheGameExtreme.model.gameActions.classic protected bool Rule(Card card, Stack stack, bool bottomUp, Player player, List CurrentCardPlayed) { - if ((bottomUp && card.Value > stack.Peek().Value) || (!bottomUp && card.Value < stack.Peek().Value) || card.Value.CompareTo(stack.Peek().Value - 10) == 0 || card.Value.CompareTo(stack.Peek().Value + 10) == 0) + if ((bottomUp && card.Value.CompareTo(stack.Peek().Value) > 0) || (!bottomUp && card.Value.CompareTo(stack.Peek().Value) < 0)) // || card.Value.CompareTo(stack.Peek().Value - 10) == 0 || card.Value.CompareTo(stack.Peek().Value + 10) == 0 => creer classe abstraite decimal carte qui pour contenir isMultiple { OldCard = stack.Peek(); player.joue(card); diff --git a/TheGameExtreme/view/GamePreparationPage.xaml b/TheGameExtreme/view/GamePreparationPage.xaml index 33a7fa4..04ae228 100644 --- a/TheGameExtreme/view/GamePreparationPage.xaml +++ b/TheGameExtreme/view/GamePreparationPage.xaml @@ -140,22 +140,6 @@ - - - - - - - + WidthRequest="200" + MaxLength="18"/> diff --git a/TheGameExtreme/view/GamePreparationPage.xaml.cs b/TheGameExtreme/view/GamePreparationPage.xaml.cs index 605d4f5..17d8ffa 100644 --- a/TheGameExtreme/view/GamePreparationPage.xaml.cs +++ b/TheGameExtreme/view/GamePreparationPage.xaml.cs @@ -85,8 +85,8 @@ namespace TheGameExtreme.view BackgroundColor = (Color)Application.Current.Resources["SkyBlueColor"], WidthRequest = 200, MinimumWidthRequest = 50, - HorizontalOptions = LayoutOptions.Center - + HorizontalOptions = LayoutOptions.Center, + MaxLength = 18 }; diff --git a/TheGameExtreme/view/HomePage.xaml b/TheGameExtreme/view/HomePage.xaml index 4baa5d0..66da2c4 100644 --- a/TheGameExtreme/view/HomePage.xaml +++ b/TheGameExtreme/view/HomePage.xaml @@ -1,70 +1,88 @@  - + + - - - + + + - - - - + + + + -