vue préparation partie

master
Baptiste ARNAUD 5 years ago
parent a589a3d859
commit 0499ba1f60

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

@ -178,19 +178,19 @@ namespace TheGameExtreme {
} }
/// <summary> /// <summary>
/// Recherche une chaîne localisée semblable à -L&apos;objectif est de battre le jeu ! Seul ou à plusieurs ! /// Recherche une chaîne localisée semblable à -L&apos;objectif est de battre la machine ! Seul ou à plusieurs !
/// ///
///-98 cartes numérotés de 2 à 99. ///-Le but est de pouvoir poser toute les cartes de la pioche sur les différentes piles à votre disposition.
/// ///
///-4 piles sont à votre disposition, deux ascendantes et deux descendantes. ///-Le jeu comporte 98 cartes numérotées de 2 à 99.
/// ///
///-L&apos;objectif est de pourvoir poser toute les cartes de la pioches sur les différentes piles à votre disposition. ///-4 piles sont à votre disposition, deux ascendantes(↑), et deux descendantes(↓).
/// ///
///-Si vous arrivez à vider toute la pioche et de poser tout les cartes sur les piles, vous gagnez, sinon vous perdez. ///-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. ///-Chaque joueur doit jouer au minimum deux cartes par tour.
/// ///
///-Sur une pile ascendante, il est possible de [le reste de la chaîne a été tronqué]&quot;;. ///-Pour empiler les cartes sur [le reste de la chaîne a été tronqué]&quot;;.
/// </summary> /// </summary>
internal static string StrRules { internal static string StrRules {
get { get {

@ -156,23 +156,23 @@
<value>Le joueur n'a plus de carte dans sa main</value> <value>Le joueur n'a plus de carte dans sa main</value>
</data> </data>
<data name="StrRules" xml:space="preserve"> <data name="StrRules" xml:space="preserve">
<value>-L'objectif est de battre le jeu ! Seul ou à plusieurs ! <value>-L'objectif est de battre la machine ! Seul ou à plusieurs !
-98 cartes numérotés de 2 à 99. -Le but est de pouvoir poser toute les cartes de la pioche sur les différentes piles à votre disposition.
-4 piles sont à votre disposition, deux ascendantes et deux descendantes. -Le jeu comporte 98 cartes numérotées de 2 à 99.
-L'objectif est de pourvoir poser toute les cartes de la pioches sur les différentes piles à votre disposition. -4 piles sont à votre disposition, deux ascendantes(↑), et deux descendantes(↓).
-Si vous arrivez à vider toute la pioche et de poser tout les cartes sur les piles, vous gagnez, sinon vous perdez. -L'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. -Chaque joueur doit jouer au minimum deux cartes par tour.
-Sur une pile ascendante, il est possible de reculer de 10 (ex : 73 est joué -&gt; possibilité de jouer au dessus de 73 ou bien 63). -Pour empiler les cartes sur une pile, il faut simplement faire glisser la carte sur la pile choisie
-Sur une pile descendante, il est possible de reculer de 10 (ex : 73 est joué -&gt; possibilité de jouer en dessous de 73 ou bien 83). -Sur une pile ascendante (↑), il est possible de descendre de 10 (ex : 73 est joué -&gt; possibilité de jouer au dessus de 73 ou bien 63).
-La cohésion et la stratégie seront deux amis important pour venir à bout de The Game.</value> -Sur une pile descendante (↓), il est possible de monter de 10 (ex : 73 est joué -&gt; possibilité de jouer en dessous de 73 ou bien 83).</value>
</data> </data>
<data name="StrSkullEffect" xml:space="preserve"> <data name="StrSkullEffect" xml:space="preserve">
<value>Désolé, vous n'avez pas recouvert la tête de mort... Réessayez ;)</value> <value>Désolé, vous n'avez pas recouvert la tête de mort... Réessayez ;)</value>

@ -7,11 +7,12 @@
x:Class="TheGameExtreme.view.GamePreparationPage"> x:Class="TheGameExtreme.view.GamePreparationPage">
<Grid <Grid
Margin="5,5,5,5"> Margin="5,0,5,5">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="10*" /> <RowDefinition Height="10*" />
<RowDefinition Height="25*" /> <RowDefinition Height="20*" />
<RowDefinition Height="35*" /> <RowDefinition Height="20*" />
<RowDefinition Height="20*" />
<RowDefinition Height="30*" /> <RowDefinition Height="30*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -29,50 +30,88 @@
WidthRequest="50" WidthRequest="50"
Clicked="Back" Clicked="Back"
BackgroundColor="Transparent" BackgroundColor="Transparent"
Margin="10,0,0,0"/> Margin="10,10,0,0"/>
</StackLayout> </StackLayout>
<StackLayout <StackLayout
Grid.Row="1" Grid.Row="1"
Grid.Column="0" Grid.Column="1"
Grid.ColumnSpan="2"> Margin="0,0,50,0">
<Label <Label Text="Nombre de joueur : "
HorizontalTextAlignment="Center" TextColor="{DynamicResource WhiteColor}"
FontSize="16"
VerticalTextAlignment="Center" VerticalTextAlignment="Center"
x:Name="Instruction" HorizontalTextAlignment="Center"/>
FontSize="24" <Picker
TextColor="{DynamicResource WhiteColor}"/> x:Name="PlayerSelecter"
BackgroundColor="{DynamicResource SkyBlueColor}"
SelectedIndexChanged="ChangedPseudo"
HorizontalOptions="Center"
VerticalOptions="Center"
WidthRequest="220"
Margin="50,0,50,0"/>
</StackLayout> </StackLayout>
<StackLayout <StackLayout
Grid.Row="2" Grid.Row="2"
Grid.Column="0" Grid.Column="1"
Margin="50,0,50,0"> Margin="0,0,50,0">
<Frame BackgroundColor="{DynamicResource SkyBlueColor}" <Label Text="Jouer avec des valeurs :"
CornerRadius="10" TextColor="{DynamicResource WhiteColor}"
HeightRequest="45" FontSize="16"
VerticalOptions="Center" VerticalTextAlignment="Center"
HorizontalOptions="Center" HorizontalTextAlignment="Center"/>
WidthRequest="150">
<Picker <Picker
x:Name="PlayerSelecter" x:Name="SelectMode"
BackgroundColor="{DynamicResource SkyBlueColor}" BackgroundColor="{DynamicResource SkyBlueColor}"
SelectedIndexChanged="ChangedPseudo" SelectedIndexChanged="SelectMode_SelectedIndexChanged"
HorizontalOptions="Center" HorizontalOptions="Center"
VerticalOptions="Center" VerticalOptions="Center"
WidthRequest="220" WidthRequest="220"
Margin="50,0,50,0"/> Margin="50,0,50,0"/>
</Frame>
</StackLayout> </StackLayout>
<ScrollView <StackLayout
Grid.Row="2"
Grid.Column="1" Grid.Column="1"
Margin="50,0,50,0"> Grid.Row="3"
Margin="0,0,50,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="50,0,50,0"
WidthRequest="220"
HorizontalOptions="Center"
VerticalOptions="Center"/>
</StackLayout>
<StackLayout <StackLayout
x:Name="NameList"> x:Name="NameList"
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.Column="0"
Grid.Row="1"
Margin="50,27,50,0">
<!--<Frame BackgroundColor="{DynamicResource SkyBlueColor}" <!--<Frame BackgroundColor="{DynamicResource SkyBlueColor}"
CornerRadius="10" CornerRadius="10"
HeightRequest="45" HeightRequest="45"
@ -87,19 +126,23 @@
<Entry <Entry
BackgroundColor="{DynamicResource SkyBlueColor}" BackgroundColor="{DynamicResource SkyBlueColor}"
Placeholder="Pseudo" Placeholder="Pseudo"
HorizontalTextAlignment="Start"/> HorizontalTextAlignment="Start"
HeightRequest="45"/>
</StackLayout> </StackLayout>
</ScrollView>
<StackLayout <StackLayout
Grid.Row="3" Grid.Row="4"
Grid.Column="0" Grid.Column="0"
Grid.ColumnSpan="2"> Grid.ColumnSpan="2">
<Button <Button
Margin="0,55,0,0"
Text="Play" Text="Play"
Clicked="Play" Clicked="Play"
HorizontalOptions="Center" HorizontalOptions="End"
WidthRequest="220" WidthRequest="220"
BackgroundColor="{DynamicResource SkyBlueColor}" BackgroundColor="{DynamicResource SkyBlueColor}"
CornerRadius="10"/> CornerRadius="10"/>

@ -18,16 +18,25 @@ namespace TheGameExtreme.view
} }
} }
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<int> listNbStack = new List<int> { 4, 5, 6, 7, 8 };
public GamePreparationPage() public GamePreparationPage()
{ {
InitializeComponent(); InitializeComponent();
NavigationPage.SetHasNavigationBar(this, false); NavigationPage.SetHasNavigationBar(this, false);
Instruction.SetBinding(Label.TextProperty, new Binding("InstructionText", source: this)); //Instruction.SetBinding(Label.TextProperty, new Binding("InstructionText", source: this));
InstructionText = AppRessource.StrPlayerSelection; InstructionText = AppRessource.StrPlayerSelection;
PlayerSelecter.ItemsSource = listNbPlayer; PlayerSelecter.ItemsSource = listNbPlayer;
PlayerSelecter.SelectedIndex = 0; PlayerSelecter.SelectedIndex = 0;
SelectMode.ItemsSource = listGameMode;
SelectMode.SelectedIndex = 0;
SelectNbStack.ItemsSource = listNbStack;
SelectNbStack.SelectedIndex = 0;
} }
private async void Back(object sender, EventArgs e) private async void Back(object sender, EventArgs e)
@ -39,6 +48,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 = 0; i < NameList.Children.Count; i++)
{ {
playersNames.Add(((Entry)NameList.Children[i]).Text); playersNames.Add(((Entry)NameList.Children[i]).Text);
@ -83,5 +93,17 @@ namespace TheGameExtreme.view
} }
} }
} }
private void SelectNbStack_Changed(object sender, EventArgs args)
{
}
private void SelectMode_SelectedIndexChanged(object sender, EventArgs e)
{
}
} }
} }

@ -30,7 +30,7 @@ namespace TheGameExtreme.view
private async void Rules_Clicked(object sender, EventArgs e) private async void Rules_Clicked(object sender, EventArgs e)
{ {
await DisplayAlert("Règles", AppRessource.StrRules, "let's go"); await DisplayAlert("Règles", AppRessource.StrRules, "Fermer");
} }

@ -68,9 +68,14 @@
HeightRequest="45" HeightRequest="45"
BackgroundColor="{DynamicResource BlackColor}" BackgroundColor="{DynamicResource BlackColor}"
Clicked="PlayToHome"/> Clicked="PlayToHome"/>
<Label Text="↑" TextColor="White"
FontSize="64"
Grid.Column="0" Grid.Row="1" Margin="120,0,0,10"/>
</StackLayout> </StackLayout>
<StackLayout <StackLayout
Grid.Row="0" Grid.Row="0"
Grid.Column="2" Grid.Column="2"
@ -82,6 +87,9 @@
BackgroundColor="{DynamicResource SkyBlueColor}" BackgroundColor="{DynamicResource SkyBlueColor}"
HeightRequest="35" HeightRequest="35"
Clicked="EndTurn"/> Clicked="EndTurn"/>
<Label Text="↓" TextColor="White"
FontSize="64" Grid.Column="2" Grid.Row="1" Margin="0,0,120,10"/>
</StackLayout> </StackLayout>

@ -33,7 +33,7 @@ namespace TheGameExtreme.view
if (CBBr.IsChecked == true) if (CBBr.IsChecked == true)
{ {
CBFr.IsChecked = false; CBFr.IsChecked = false;
AppRessources_br.StrRules.ToString();
} }
else if(CBBr.IsChecked == false) else if(CBBr.IsChecked == false)
{ {

Loading…
Cancel
Save