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
//------------------------------------------------------------------------------
// <auto-generated>
// 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.
// </auto-generated>
//------------------------------------------------------------------------------

@ -1,57 +1,44 @@
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// 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.
// </auto-generated>
//------------------------------------------------------------------------------
namespace TheGameExtreme {
using System;
using System.Reflection;
/// <summary>
/// Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées.
/// </summary>
// 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()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
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() {
}
/// <summary>
/// Retourne l'instance ResourceManager mise en cache utilisée par cette classe.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
internal static System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TheGameExtreme.AppRessource", typeof(AppRessource).Assembly);
if (object.Equals(null, resourceMan)) {
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("TheGameExtreme.AppRessource", typeof(AppRessource).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Remplace la propriété CurrentUICulture du thread actuel pour toutes
/// 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 {
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
internal static System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
@ -60,180 +47,102 @@ namespace TheGameExtreme {
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Pile ascendante.
/// </summary>
internal static string StrAcendingStack {
get {
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 {
get {
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 {
get {
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 {
get {
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 {
get {
return ResourceManager.GetString("StrChooseStack", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Pile Descendante.
/// </summary>
internal static string StrDownStack {
get {
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 {
get {
return ResourceManager.GetString("StrEndOfGame", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Fin de tour.
/// </summary>
internal static string StrEndTurn {
get {
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 {
get {
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 {
get {
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 {
get {
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 {
get {
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 {
get {
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 {
get {
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 {
get {
return ResourceManager.GetString("StrWrongStack", resourceCulture);
}
}
internal static string StrPlayerSelections {
get {
return ResourceManager.GetString("StrPlayerSelections", resourceCulture);
}
}
internal static string StrEnterPseudo {
get {
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,137 +6,158 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TheGameExtreme.view.GamePreparationPage">
<Grid
Margin="5,0,5,5">
<Grid.RowDefinitions>
<RowDefinition Height="10*" />
<RowDefinition Height="100*" />
<RowDefinition Height="10*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="50*" />
</Grid.ColumnDefinitions>
<StackLayout
Grid.Row="0"
Grid.Column="0">
<ImageButton Source="ArrowSettingsBack.png"
VerticalOptions="Start"
HorizontalOptions="StartAndExpand"
HeightRequest="40"
WidthRequest="50"
Clicked="Back"
BackgroundColor="Transparent"
Margin="10,10,0,0"/>
</StackLayout>
<ScrollView>
<Grid
Margin="5,0,5,5">
<Grid.RowDefinitions>
<RowDefinition Height="10*" />
<RowDefinition Height="90*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="50*" />
</Grid.ColumnDefinitions>
<StackLayout
Grid.Row="0"
Grid.Column="0">
<ImageButton Source="ArrowSettingsBack.png"
VerticalOptions="Start"
HorizontalOptions="StartAndExpand"
HeightRequest="40"
WidthRequest="50"
Clicked="Back"
BackgroundColor="Transparent"
Margin="10,5,0,0"/>
</StackLayout>
<StackLayout
Grid.Row="1"
Grid.Column="1"
Margin="0,0,50,0">
<Label Text="Nombre de joueur : "
TextColor="{DynamicResource WhiteColor}"
FontSize="16"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Center"/>
<Picker
x:Name="PlayerSelecter"
<StackLayout
Grid.Row="0"
Grid.Column="1">
<Button
Text="Play"
Clicked="Play"
HorizontalOptions="End"
MinimumWidthRequest="30"
WidthRequest="100"
BackgroundColor="{DynamicResource SkyBlueColor}"
SelectedIndexChanged="ChangedPseudo"
HorizontalOptions="Center"
VerticalOptions="Center"
WidthRequest="220"
Margin="50,0,50,0"/>
</StackLayout>
<StackLayout
Grid.Row="1"
Grid.Column="1"
Margin="0,80,50,0">
<Label Text="Jouer avec des valeurs :"
TextColor="{DynamicResource WhiteColor}"
FontSize="16"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Center"/>
<Picker
x:Name="SelectMode"
BackgroundColor="{DynamicResource SkyBlueColor}"
SelectedIndexChanged="SelectMode_SelectedIndexChanged"
HorizontalOptions="Center"
VerticalOptions="Center"
WidthRequest="220"
Margin="50,0,50,0"/>
</StackLayout>
<StackLayout
Grid.Column="1"
Grid.Row="1"
Margin="0,160,50,0">
<Label Text="Nombre de pile en jeu :"
TextColor="{DynamicResource WhiteColor}"
FontSize="16"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Center"/>
<Picker x:Name="SelectNbStack"
CornerRadius="10"
Margin="0,5,10,0"/>
</StackLayout>
<Grid
Grid.Row="1"
Grid.Column="1">
<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 : "
TextColor="{DynamicResource WhiteColor}"
FontSize="16"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Center"/>
<Picker
x:Name="PlayerSelecter"
BackgroundColor="{DynamicResource SkyBlueColor}"
SelectedIndexChanged="ChangedPseudo"
HorizontalOptions="Center"
VerticalOptions="Center"
MinimumWidthRequest="30"
WidthRequest="100"
Margin="0,0,10,0"/>
</StackLayout>
<StackLayout
Grid.Row="1"
Margin="0,0,10,0">
<Label Text="Jouer avec des valeurs :"
TextColor="{DynamicResource WhiteColor}"
FontSize="16"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Center"/>
<Picker
x:Name="SelectMode"
BackgroundColor="{DynamicResource SkyBlueColor}"
SelectedIndexChanged="SelectNbStack_Changed"
Margin="50,0,50,0"
WidthRequest="220"
SelectedIndexChanged="SelectMode_SelectedIndexChanged"
HorizontalOptions="Center"
VerticalOptions="Center"/>
</StackLayout>
VerticalOptions="Center"
MinimumWidthRequest="30"
WidthRequest="100"
Margin="0,0,10,0"/>
</StackLayout>
<StackLayout
Grid.Row="2"
Margin="0,0,10,0">
<Label Text="Nombre de pile en jeu :"
TextColor="{DynamicResource WhiteColor}"
FontSize="16"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Center"/>
<Picker x:Name="SelectNbStack"
BackgroundColor="{DynamicResource SkyBlueColor}"
SelectedIndexChanged="SelectNbStack_Changed"
Margin="0,0,10,0"
MinimumWidthRequest="30"
WidthRequest="100"
HorizontalOptions="Center"
VerticalOptions="Center"/>
</StackLayout>
</Grid>
<!--<StackLayout
Grid.Row="0"
Grid.Column="0"
Margin="50,30,50,0">
<Label Text="Nom des joueurs"
TextColor="{DynamicResource WhiteColor}"
FontSize="16"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Center"/>
</StackLayout>-->
<!--<StackLayout
Grid.Row="0"
Grid.Column="0"
Margin="50,30,50,0">
<Label Text="Nom des joueurs"
TextColor="{DynamicResource WhiteColor}"
FontSize="16"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Center"/>
</StackLayout>-->
<StackLayout
x:Name="NameList"
Grid.Column="0"
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
BackgroundColor="{DynamicResource SkyBlueColor}"
Placeholder="Pseudo"
HorizontalTextAlignment="Start"
HeightRequest="45"/>
HorizontalOptions="Center"
MinimumWidthRequest="50"
WidthRequest="200"/>
</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"
WidthRequest="220"
BackgroundColor="{DynamicResource SkyBlueColor}"
CornerRadius="10"/>
</StackLayout>
</Grid>
</Grid>
</ScrollView>
</ContentPage>

@ -7,16 +7,6 @@ namespace TheGameExtreme.view
{
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<string> listGameMode = new List<string> { "entières", "relatives", "décimales", "fractionnées" };
public List<int> listNbStack = new List<int> { 4, 5, 6, 7, 8 };
@ -26,8 +16,6 @@ namespace TheGameExtreme.view
{
InitializeComponent();
NavigationPage.SetHasNavigationBar(this, false);
//Instruction.SetBinding(Label.TextProperty, new Binding("InstructionText", source: this));
InstructionText = AppRessource.StrPlayerSelections;
PlayerSelecter.ItemsSource = listNbPlayer;
PlayerSelecter.SelectedIndex = 0;
@ -49,7 +37,7 @@ namespace TheGameExtreme.view
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);
if (string.IsNullOrWhiteSpace(playersNames[playersNames.Count - 1]))
@ -64,15 +52,18 @@ namespace TheGameExtreme.view
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
{
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

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

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

Loading…
Cancel
Save