HomePage + langue

master
Baptiste ARNAUD 6 years ago
parent 0974fbc1b9
commit da3db0cd21

@ -24,6 +24,7 @@ Global
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DD6C4FD6-058C-41F9-824F-84DABA5DD444}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DD6C4FD6-058C-41F9-824F-84DABA5DD444}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DD6C4FD6-058C-41F9-824F-84DABA5DD444}.Debug|Any CPU.Build.0 = Debug|Any CPU {DD6C4FD6-058C-41F9-824F-84DABA5DD444}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DD6C4FD6-058C-41F9-824F-84DABA5DD444}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{DD6C4FD6-058C-41F9-824F-84DABA5DD444}.Debug|iPhone.ActiveCfg = Debug|Any CPU {DD6C4FD6-058C-41F9-824F-84DABA5DD444}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{DD6C4FD6-058C-41F9-824F-84DABA5DD444}.Debug|iPhone.Build.0 = Debug|Any CPU {DD6C4FD6-058C-41F9-824F-84DABA5DD444}.Debug|iPhone.Build.0 = Debug|Any CPU
{DD6C4FD6-058C-41F9-824F-84DABA5DD444}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU {DD6C4FD6-058C-41F9-824F-84DABA5DD444}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU

@ -79,7 +79,7 @@ namespace TheGameExtreme {
} }
/// <summary> /// <summary>
/// Recherche une chaîne localisée semblable à Vous n&apos;avez pas joué assez de carte!. /// Recherche une chaîne localisée semblable à Vous n&apos;avez pas joué assez de carte! essaye encore.
/// </summary> /// </summary>
internal static string StrCardPlayedLessThanTwo { internal static string StrCardPlayedLessThanTwo {
get { get {
@ -114,6 +114,15 @@ namespace TheGameExtreme {
} }
} }
/// <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> /// <summary>
/// Recherche une chaîne localisée semblable à Fin de tour. /// Recherche une chaîne localisée semblable à Fin de tour.
/// </summary> /// </summary>

@ -125,7 +125,7 @@
<value>La pile choisie n'existe pas!</value> <value>La pile choisie n'existe pas!</value>
</data> </data>
<data name="StrCardPlayedLessThanTwo" xml:space="preserve"> <data name="StrCardPlayedLessThanTwo" xml:space="preserve">
<value>Vous n'avez pas joué assez de carte!</value> <value>Vous n'avez pas joué assez de carte! essaye encore</value>
</data> </data>
<data name="StrChooseCardToPlay" xml:space="preserve"> <data name="StrChooseCardToPlay" xml:space="preserve">
<value>Veuillez selectionner une carte à placer sur une pile</value> <value>Veuillez selectionner une carte à placer sur une pile</value>
@ -139,6 +139,9 @@
<value>Pile Descendante</value> <value>Pile Descendante</value>
<comment>String to indicate an down stack</comment> <comment>String to indicate an down stack</comment>
</data> </data>
<data name="StrEndOfGame" xml:space="preserve">
<value>Le jeu est fini! Veuillez lancer une nouvelle partie!</value>
</data>
<data name="StrEndTurn" xml:space="preserve"> <data name="StrEndTurn" xml:space="preserve">
<value>Fin de tour</value> <value>Fin de tour</value>
<comment>Button to end turn</comment> <comment>Button to end turn</comment>

@ -0,0 +1,189 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Ce code a été généré par un outil.
// Version du runtime :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é.
// </auto-generated>
//------------------------------------------------------------------------------
namespace TheGameExtreme {
using System;
/// <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()]
internal class AppRessources_br {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal AppRessources_br() {
}
/// <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 {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TheGameExtreme.AppRessources-br", typeof(AppRessources_br).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 {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à rising stack.
/// </summary>
internal static string StrAcendingStack {
get {
return ResourceManager.GetString("StrAcendingStack", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à the chosen pile does not exist.
/// </summary>
internal static string StrCantGetStack {
get {
return ResourceManager.GetString("StrCantGetStack", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à You have not played enough cards!.
/// </summary>
internal static string StrCardPlayedLessThanTwo {
get {
return ResourceManager.GetString("StrCardPlayedLessThanTwo", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Please select a card to place on a stack.
/// </summary>
internal static string StrChooseCardToPlay {
get {
return ResourceManager.GetString("StrChooseCardToPlay", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Select the stack on which you want to put the card.
/// </summary>
internal static string StrChooseStack {
get {
return ResourceManager.GetString("StrChooseStack", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Down stack.
/// </summary>
internal static string StrDownStack {
get {
return ResourceManager.GetString("StrDownStack", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à End of turn.
/// </summary>
internal static string StrEndTurn {
get {
return ResourceManager.GetString("StrEndTurn", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à .
/// </summary>
internal static string String1 {
get {
return ResourceManager.GetString("String1", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à The game is over! Sorry, you lost ... Try again!.
/// </summary>
internal static string StrLose {
get {
return ResourceManager.GetString("StrLose", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à The game is over! Sorry, you lost ... You had to play three cards because of the effect \ &quot;Three cards played \&quot; off your game does not play as much! Try again!.
/// </summary>
internal static string StrLose3CardEffect {
get {
return ResourceManager.GetString("StrLose3CardEffect", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à The player has no more cards in his hand.
/// </summary>
internal static string StrNoMoreCardOnHand {
get {
return ResourceManager.GetString("StrNoMoreCardOnHand", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à Sorry, you did not cover the skull ... Try again;).
/// </summary>
internal static string StrSkullEffect {
get {
return ResourceManager.GetString("StrSkullEffect", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à The game is over! Well done you won!.
/// </summary>
internal static string StrWin {
get {
return ResourceManager.GetString("StrWin", resourceCulture);
}
}
/// <summary>
/// Recherche une chaîne localisée semblable à The card does not fit in the selected stack!.
/// </summary>
internal static string StrWrongStack {
get {
return ResourceManager.GetString("StrWrongStack", resourceCulture);
}
}
}
}

@ -143,6 +143,9 @@
<value>End of turn</value> <value>End of turn</value>
<comment>Button to end turn</comment> <comment>Button to end turn</comment>
</data> </data>
<data name="String1" xml:space="preserve">
<value />
</data>
<data name="StrLose" xml:space="preserve"> <data name="StrLose" xml:space="preserve">
<value>The game is over! Sorry, you lost ... Try again!</value> <value>The game is over! Sorry, you lost ... Try again!</value>
</data> </data>

@ -12,7 +12,6 @@
<ItemGroup> <ItemGroup>
<Folder Include="model\event\" /> <Folder Include="model\event\" />
<Folder Include="viewmodel\" /> <Folder Include="viewmodel\" />
<Folder Include="view\" />
<Folder Include="model\card\" /> <Folder Include="model\card\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -25,12 +24,33 @@
<None Remove="AppRessources.config" /> <None Remove="AppRessources.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Update="AppRessource.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>AppRessource.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="AppRessources-br.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>AppRessources-br.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Condition=" '$(EnableDefaultEmbeddedResourceItems)' == 'true' " Update="view\AppResources.resx"> <EmbeddedResource Condition=" '$(EnableDefaultEmbeddedResourceItems)' == 'true' " Update="view\AppResources.resx">
<Generator>PublicResXFileCodeGenerator</Generator> <Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>AppResources.Designer.cs</LastGenOutput> <LastGenOutput>AppResources.Designer.cs</LastGenOutput>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Update="view\HomePage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Update="AppRessource.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>AppRessource.resx</DependentUpon>
</Compile>
<Compile Update="AppRessources-br.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>AppRessources-br.resx</DependentUpon>
</Compile>
<Compile Condition=" '$(EnableDefaultCompileItems)' == 'true' " Update="view\AppResources.Designer.cs"> <Compile Condition=" '$(EnableDefaultCompileItems)' == 'true' " Update="view\AppResources.Designer.cs">
<DependentUpon>AppResources.resx</DependentUpon> <DependentUpon>AppResources.resx</DependentUpon>
</Compile> </Compile>

@ -21,6 +21,7 @@ namespace TheGameExtreme.model.manager
public List<Card> CurrentHand { get; set; } public List<Card> CurrentHand { get; set; }
protected int nbCardAtBeginOfTurn; protected int nbCardAtBeginOfTurn;
protected List<Card> CurrentCardPlayed = new List<Card>(); protected List<Card> CurrentCardPlayed = new List<Card>();
protected string langue;
public GameManager(int nbPlayer, List<String> players) public GameManager(int nbPlayer, List<String> players)
@ -31,6 +32,7 @@ namespace TheGameExtreme.model.manager
this.nbPlayer = nbPlayer; this.nbPlayer = nbPlayer;
players.ForEach(player => playerList.Add(new Player(player))); players.ForEach(player => playerList.Add(new Player(player)));
ListOrderedStacks.Add(new Stack<Card>()); ListOrderedStacks.Add(new Stack<Card>());
ListOrderedStacks.Add(new Stack<Card>()); ListOrderedStacks.Add(new Stack<Card>());
ListOrderedStacks.Add(new Stack<Card>()); ListOrderedStacks.Add(new Stack<Card>());
@ -128,7 +130,8 @@ namespace TheGameExtreme.model.manager
{ {
if (EndMessage != null) if (EndMessage != null)
{ {
throw new Exception("Le jeu est fini! Veuillez lancer une nouvelle partie!"); //throw new Exception("Le jeu est fini! Veuillez lancer une nouvelle partie!");
throw new Exception(AppRessource.StrEndOfGame);
} }
foreach(Card card in CurrentHand) foreach(Card card in CurrentHand)
{ {
@ -147,7 +150,7 @@ namespace TheGameExtreme.model.manager
} }
else else
{ {
throw new Exception("La pile choisie n'existe pas!"); throw new Exception(AppRessource.StrCantGetStack);
} }
return; return;
} }
@ -166,7 +169,7 @@ namespace TheGameExtreme.model.manager
} }
else else
{ {
throw new Exception("La carte ne rentre pas dans la pile sectionné!"); throw new Exception(AppRessource.StrWrongStack);
} }
} }

@ -66,8 +66,8 @@ namespace TheGameExtreme.model.manager
} }
else else
{ {
throw new Exception("Vous n'avez pas joué assez de carte!"); //throw new Exception("Vous n'avez pas joué assez de carte!");
throw new Exception(AppRessource.StrCardPlayedLessThanTwo); throw new Exception(AppRessources_br.StrCardPlayedLessThanTwo);
} }
} }

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
x:Class="TheGameExtreme.view.HomePage">
<ContentView.Content>
<StackLayout>
<Label Text="The Game" HorizontalTextAlignment="Center" />
</StackLayout>
</ContentView.Content>
</ContentView>

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace TheGameExtreme.view
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class HomePage : ContentView
{
public HomePage()
{
InitializeComponent();
}
}
}

@ -61,7 +61,7 @@ namespace UnitTestProjectGame
bool valueExpected = false; bool valueExpected = false;
bool valueExpected1 = true; bool valueExpected1 = true;
bool valueBool; bool valueBool;
int nbCardplayed = 2;
valueBool = g1.endTurn(); valueBool = g1.endTurn();
try { try {

Loading…
Cancel
Save