Changement du titre et debut d'implémentation des nouvelles versions de jeu

master
cldupland 5 years ago
parent e88e0720dc
commit db317ada46

@ -1,11 +1,11 @@
#pragma warning disable 1591 #pragma warning disable 1591
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Ce code a été généré par un outil. // This code was generated by a tool.
// Version du runtime :4.0.30319.42000 // Runtime Version:4.0.30319.42000
// //
// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si // Changes to this file may cause incorrect behavior and will be lost if
// le code est régénéré. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------

@ -1,57 +1,44 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Ce code a été généré par un outil. // This code was generated by a tool.
// Version du runtime :4.0.30319.42000 // Runtime Version:4.0.30319.42000
// //
// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si // Changes to this file may cause incorrect behavior and will be lost if
// le code est régénéré. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace TheGameExtreme { namespace TheGameExtreme {
using System; using System;
using System.Reflection;
/// <summary> [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
/// Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées. [System.Diagnostics.DebuggerNonUserCodeAttribute()]
/// </summary> [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
// Cette classe a été générée automatiquement par la classe StronglyTypedResourceBuilder
// à l'aide d'un outil, tel que ResGen ou Visual Studio.
// Pour ajouter ou supprimer un membre, modifiez votre fichier .ResX, puis réexécutez ResGen
// avec l'option /str ou régénérez votre projet VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class AppRessource { internal class AppRessource {
private static global::System.Resources.ResourceManager resourceMan; private static System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture; private static System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal AppRessource() { internal AppRessource() {
} }
/// <summary> [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
/// Retourne l'instance ResourceManager mise en cache utilisée par cette classe. internal static System.Resources.ResourceManager ResourceManager {
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get { get {
if (object.ReferenceEquals(resourceMan, null)) { if (object.Equals(null, resourceMan)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TheGameExtreme.AppRessource", typeof(AppRessource).Assembly); System.Resources.ResourceManager temp = new System.Resources.ResourceManager("TheGameExtreme.AppRessource", typeof(AppRessource).Assembly);
resourceMan = temp; resourceMan = temp;
} }
return resourceMan; return resourceMan;
} }
} }
/// <summary> [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
/// Remplace la propriété CurrentUICulture du thread actuel pour toutes internal static System.Globalization.CultureInfo Culture {
/// les recherches de ressources à l'aide de cette classe de ressource fortement typée.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get { get {
return resourceCulture; return resourceCulture;
} }
@ -60,180 +47,102 @@ namespace TheGameExtreme {
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Pile ascendante.
/// </summary>
internal static string StrAcendingStack { internal static string StrAcendingStack {
get { get {
return ResourceManager.GetString("StrAcendingStack", resourceCulture); return ResourceManager.GetString("StrAcendingStack", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à La pile choisie n&apos;existe pas!.
/// </summary>
internal static string StrCantGetStack { internal static string StrCantGetStack {
get { get {
return ResourceManager.GetString("StrCantGetStack", resourceCulture); return ResourceManager.GetString("StrCantGetStack", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Carte inexistante.
/// </summary>
internal static string StrCardDoesntExist {
get {
return ResourceManager.GetString("StrCardDoesntExist", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Vous n&apos;avez pas joué assez de carte! essaye encore.
/// </summary>
internal static string StrCardPlayedLessThanTwo { internal static string StrCardPlayedLessThanTwo {
get { get {
return ResourceManager.GetString("StrCardPlayedLessThanTwo", resourceCulture); return ResourceManager.GetString("StrCardPlayedLessThanTwo", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Veuillez selectionner une carte à placer sur une pile.
/// </summary>
internal static string StrChooseCardToPlay { internal static string StrChooseCardToPlay {
get { get {
return ResourceManager.GetString("StrChooseCardToPlay", resourceCulture); return ResourceManager.GetString("StrChooseCardToPlay", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Selectionner la pile sur laquelle vous souhaitez poser la carte.
/// </summary>
internal static string StrChooseStack { internal static string StrChooseStack {
get { get {
return ResourceManager.GetString("StrChooseStack", resourceCulture); return ResourceManager.GetString("StrChooseStack", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Pile Descendante.
/// </summary>
internal static string StrDownStack { internal static string StrDownStack {
get { get {
return ResourceManager.GetString("StrDownStack", resourceCulture); return ResourceManager.GetString("StrDownStack", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Le jeu est fini! Veuillez lancer une nouvelle partie!.
/// </summary>
internal static string StrEndOfGame { internal static string StrEndOfGame {
get { get {
return ResourceManager.GetString("StrEndOfGame", resourceCulture); return ResourceManager.GetString("StrEndOfGame", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Fin de tour.
/// </summary>
internal static string StrEndTurn { internal static string StrEndTurn {
get { get {
return ResourceManager.GetString("StrEndTurn", resourceCulture); return ResourceManager.GetString("StrEndTurn", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Veuillez saisir votre pseudo.
/// </summary>
internal static string StrEnterPseudo {
get {
return ResourceManager.GetString("StrEnterPseudo", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Le jeu est terminé! Désolé, vous avez perdu... Essayez encore!.
/// </summary>
internal static string StrLose { internal static string StrLose {
get { get {
return ResourceManager.GetString("StrLose", resourceCulture); return ResourceManager.GetString("StrLose", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Le jeu est terminé! Désolé, vous avez perdu... Vous deviez jouer trois cartes à cause de l&apos;effet \&quot;Trois cartes joué\&quot; hors votre jeu ne permet pas d&apos;en jouer autant! Essayez encore!.
/// </summary>
internal static string StrLose3CardEffect { internal static string StrLose3CardEffect {
get { get {
return ResourceManager.GetString("StrLose3CardEffect", resourceCulture); return ResourceManager.GetString("StrLose3CardEffect", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Le joueur n&apos;a plus de carte dans sa main.
/// </summary>
internal static string StrNoMoreCardOnHand { internal static string StrNoMoreCardOnHand {
get { get {
return ResourceManager.GetString("StrNoMoreCardOnHand", resourceCulture); return ResourceManager.GetString("StrNoMoreCardOnHand", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Veuillez choisir un nombre de joueur et leur(s) nom(s).
/// </summary>
internal static string StrPlayerSelections {
get {
return ResourceManager.GetString("StrPlayerSelections", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à -L&apos;objectif est de battre la machine ! Seul ou à plusieurs !
///
///-Le but est de pouvoir poser toute les cartes de la pioche sur les différentes piles à votre disposition.
///
///-Le jeu comporte 98 cartes numérotées de 2 à 99.
///
///-4 piles sont à votre disposition, deux ascendantes(↑), et deux descendantes(↓).
///
///-L&apos;objectif est de réussir à poser la totalité des cartes sur les piles proposées, afin de gagner la partie.
///
///-Chaque joueur doit jouer au minimum deux cartes par tour.
///
///-Pour empiler les cartes sur [le reste de la chaîne a été tronqué]&quot;;.
/// </summary>
internal static string StrRules { internal static string StrRules {
get { get {
return ResourceManager.GetString("StrRules", resourceCulture); return ResourceManager.GetString("StrRules", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Désolé, vous n&apos;avez pas recouvert la tête de mort... Réessayez ;).
/// </summary>
internal static string StrSkullEffect { internal static string StrSkullEffect {
get { get {
return ResourceManager.GetString("StrSkullEffect", resourceCulture); return ResourceManager.GetString("StrSkullEffect", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à Le jeu est terminé!\n Bravo vous avez gagné!.
/// </summary>
internal static string StrWin { internal static string StrWin {
get { get {
return ResourceManager.GetString("StrWin", resourceCulture); return ResourceManager.GetString("StrWin", resourceCulture);
} }
} }
/// <summary>
/// Recherche une chaîne localisée semblable à La carte ne rentre pas dans la pile sectionnée!.
/// </summary>
internal static string StrWrongStack { internal static string StrWrongStack {
get { get {
return ResourceManager.GetString("StrWrongStack", resourceCulture); return ResourceManager.GetString("StrWrongStack", resourceCulture);
} }
} }
internal static string StrPlayerSelections {
get {
return ResourceManager.GetString("StrPlayerSelections", resourceCulture);
}
}
internal static string StrEnterPseudo { internal static string StrEnterPseudo {
get { get {
return ResourceManager.GetString("StrEnterPseudo", resourceCulture); return ResourceManager.GetString("StrEnterPseudo", resourceCulture);

@ -0,0 +1,10 @@
using System;
namespace TheGameExtreme.model.deck
{
public class CentaineDeck
{
public CentaineDeck()
{
}
}
}

@ -0,0 +1,23 @@
using System;
using TheGameExtreme.model.card;
using TheGameExtreme.model.card.cardType;
namespace TheGameExtreme.model.deck
{
public class DizaineDeck : Deck
{
public DizaineDeck()
{
Card card;
decimal d;
Random random = new Random();
while (deck.Count < 99)
{
d = (decimal)(random.Next(1, 49)) / 10;
// Recherche dicotomique pour insertion -> si déjà insérer break et grâce au while, il continuera le bon nombre de fois.
card = new ClassicCard(d);
deck.Add(card);
}
}
}
}

@ -0,0 +1,10 @@
using System;
namespace TheGameExtreme.model.deck
{
public class MilliemeDeck
{
public MilliemeDeck()
{
}
}
}

@ -6,13 +6,12 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TheGameExtreme.view.GamePreparationPage"> x:Class="TheGameExtreme.view.GamePreparationPage">
<ScrollView>
<Grid <Grid
Margin="5,0,5,5"> Margin="5,0,5,5">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="10*" /> <RowDefinition Height="10*" />
<RowDefinition Height="100*" /> <RowDefinition Height="90*" />
<RowDefinition Height="10*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="50*" /> <ColumnDefinition Width="50*" />
@ -29,16 +28,41 @@
WidthRequest="50" WidthRequest="50"
Clicked="Back" Clicked="Back"
BackgroundColor="Transparent" BackgroundColor="Transparent"
Margin="10,10,0,0"/> Margin="10,5,0,0"/>
</StackLayout> </StackLayout>
<StackLayout
Grid.Row="0"
Grid.Column="1">
<Button
Text="Play"
Clicked="Play"
HorizontalOptions="End"
MinimumWidthRequest="30"
WidthRequest="100"
BackgroundColor="{DynamicResource SkyBlueColor}"
CornerRadius="10"
Margin="0,5,10,0"/>
</StackLayout>
<StackLayout
<Grid
Grid.Row="1" Grid.Row="1"
Grid.Column="1" Grid.Column="1">
Margin="0,0,50,0"> <Grid.RowDefinitions>
<RowDefinition Height="10*" />
<RowDefinition Height="10*" />
<RowDefinition Height="10*" />
<RowDefinition Height="10*" />
</Grid.RowDefinitions>
<StackLayout
Grid.Row="0"
Margin="0,0,10,0"
Orientation="Vertical">
<Label Text="Nombre de joueur : " <Label Text="Nombre de joueur : "
TextColor="{DynamicResource WhiteColor}" TextColor="{DynamicResource WhiteColor}"
FontSize="16" FontSize="16"
@ -50,14 +74,14 @@
SelectedIndexChanged="ChangedPseudo" SelectedIndexChanged="ChangedPseudo"
HorizontalOptions="Center" HorizontalOptions="Center"
VerticalOptions="Center" VerticalOptions="Center"
WidthRequest="220" MinimumWidthRequest="30"
Margin="50,0,50,0"/> WidthRequest="100"
Margin="0,0,10,0"/>
</StackLayout> </StackLayout>
<StackLayout <StackLayout
Grid.Row="1" Grid.Row="1"
Grid.Column="1" Margin="0,0,10,0">
Margin="0,80,50,0">
<Label Text="Jouer avec des valeurs :" <Label Text="Jouer avec des valeurs :"
TextColor="{DynamicResource WhiteColor}" TextColor="{DynamicResource WhiteColor}"
FontSize="16" FontSize="16"
@ -69,14 +93,14 @@
SelectedIndexChanged="SelectMode_SelectedIndexChanged" SelectedIndexChanged="SelectMode_SelectedIndexChanged"
HorizontalOptions="Center" HorizontalOptions="Center"
VerticalOptions="Center" VerticalOptions="Center"
WidthRequest="220" MinimumWidthRequest="30"
Margin="50,0,50,0"/> WidthRequest="100"
Margin="0,0,10,0"/>
</StackLayout> </StackLayout>
<StackLayout <StackLayout
Grid.Column="1" Grid.Row="2"
Grid.Row="1" Margin="0,0,10,0">
Margin="0,160,50,0">
<Label Text="Nombre de pile en jeu :" <Label Text="Nombre de pile en jeu :"
TextColor="{DynamicResource WhiteColor}" TextColor="{DynamicResource WhiteColor}"
@ -86,12 +110,16 @@
<Picker x:Name="SelectNbStack" <Picker x:Name="SelectNbStack"
BackgroundColor="{DynamicResource SkyBlueColor}" BackgroundColor="{DynamicResource SkyBlueColor}"
SelectedIndexChanged="SelectNbStack_Changed" SelectedIndexChanged="SelectNbStack_Changed"
Margin="50,0,50,0" Margin="0,0,10,0"
WidthRequest="220" MinimumWidthRequest="30"
WidthRequest="100"
HorizontalOptions="Center" HorizontalOptions="Center"
VerticalOptions="Center"/> VerticalOptions="Center"/>
</StackLayout> </StackLayout>
</Grid>
@ -111,32 +139,25 @@
x:Name="NameList" x:Name="NameList"
Grid.Column="0" Grid.Column="0"
Grid.Row="1" Grid.Row="1"
Margin="50,5,50,0"> Margin="10,0,0,0">
<Label
Text="Entrer vos pseudo ici:"
TextColor="{DynamicResource WhiteColor}"
FontSize="16"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Center"/>
<Entry <Entry
BackgroundColor="{DynamicResource SkyBlueColor}" BackgroundColor="{DynamicResource SkyBlueColor}"
Placeholder="Pseudo" Placeholder="Pseudo"
HorizontalTextAlignment="Start"
HeightRequest="45"/>
</StackLayout>
<StackLayout
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="0,280,0,0">
<Button
Margin="0,0,0,0"
Text="Play"
Clicked="Play"
HorizontalOptions="Center" HorizontalOptions="Center"
WidthRequest="220" MinimumWidthRequest="50"
BackgroundColor="{DynamicResource SkyBlueColor}" WidthRequest="200"/>
CornerRadius="10"/>
</StackLayout> </StackLayout>
</Grid> </Grid>
</ScrollView>
</ContentPage> </ContentPage>

@ -7,16 +7,6 @@ namespace TheGameExtreme.view
{ {
public partial class GamePreparationPage : ContentPage public partial class GamePreparationPage : ContentPage
{ {
private string instructionText;
public string InstructionText
{
get { return instructionText; }
set
{
instructionText = value;
OnPropertyChanged("InstructionText");
}
}
public List<int> listNbPlayer = new List<int> { 1, 2, 3, 4, 5 }; public List<int> listNbPlayer = new List<int> { 1, 2, 3, 4, 5 };
public List<string> listGameMode = new List<string> { "entières", "relatives", "décimales", "fractionnées" }; public List<string> listGameMode = new List<string> { "entières", "relatives", "décimales", "fractionnées" };
public List<int> listNbStack = new List<int> { 4, 5, 6, 7, 8 }; public List<int> listNbStack = new List<int> { 4, 5, 6, 7, 8 };
@ -26,8 +16,6 @@ namespace TheGameExtreme.view
{ {
InitializeComponent(); InitializeComponent();
NavigationPage.SetHasNavigationBar(this, false); NavigationPage.SetHasNavigationBar(this, false);
//Instruction.SetBinding(Label.TextProperty, new Binding("InstructionText", source: this));
InstructionText = AppRessource.StrPlayerSelections;
PlayerSelecter.ItemsSource = listNbPlayer; PlayerSelecter.ItemsSource = listNbPlayer;
PlayerSelecter.SelectedIndex = 0; PlayerSelecter.SelectedIndex = 0;
@ -49,7 +37,7 @@ namespace TheGameExtreme.view
List<string> playersNames = new List<string>(); List<string> playersNames = new List<string>();
for (int i = 0; i < NameList.Children.Count; i++) for (int i = 1; i < NameList.Children.Count; i++)
{ {
playersNames.Add(((Entry)NameList.Children[i]).Text); playersNames.Add(((Entry)NameList.Children[i]).Text);
if (string.IsNullOrWhiteSpace(playersNames[playersNames.Count - 1])) if (string.IsNullOrWhiteSpace(playersNames[playersNames.Count - 1]))
@ -64,15 +52,18 @@ namespace TheGameExtreme.view
private void ChangedPseudo(object sender, EventArgs args) private void ChangedPseudo(object sender, EventArgs args)
{ {
while (NameList.Children.Count != (int)PlayerSelecter.SelectedItem) while (NameList.Children.Count - 1 != (int)PlayerSelecter.SelectedItem)
{ {
if (NameList.Children.Count < (int)PlayerSelecter.SelectedItem) if (NameList.Children.Count - 1 < (int)PlayerSelecter.SelectedItem)
{ {
Entry e = new Entry Entry e = new Entry
{ {
Placeholder = "Pseudo", Placeholder = "Pseudo",
BackgroundColor = (Color)Application.Current.Resources["SkyBlueColor"] BackgroundColor = (Color)Application.Current.Resources["SkyBlueColor"],
WidthRequest = 200,
MinimumWidthRequest = 50,
HorizontalOptions = LayoutOptions.Center
}; };
//Frame myFrame = new Frame //Frame myFrame = new Frame

@ -18,7 +18,7 @@
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Text="THE GAME" TextColor="{DynamicResource WhiteColor}" <Label Text="TRIONS" TextColor="{DynamicResource WhiteColor}"
Grid.Row="0" Grid.Column="1" Grid.Row="0" Grid.Column="1"
HorizontalTextAlignment="Center" HorizontalTextAlignment="Center"
FontSize="35" FontSize="35"

@ -53,7 +53,7 @@ namespace TheGameExtreme.viewmodel
public Main(List<string> playersNames) public Main(List<string> playersNames)
{ {
int nbPile = 8; int nbPile = 4;
playersNames.ForEach(name => players.Add(new PlayerVM(new Player(name)))); playersNames.ForEach(name => players.Add(new PlayerVM(new Player(name))));
Parametreur parametreur = new Parametreur(new GameMode(new ClassicPiles(nbPile), new ClassicDeck())); Parametreur parametreur = new Parametreur(new GameMode(new ClassicPiles(nbPile), new ClassicDeck()));
players.ForEach(player => parametreur.AddPlayer(player.View)); players.ForEach(player => parametreur.AddPlayer(player.View));

Loading…
Cancel
Save