Stabilisation du nouvelle algorythme de recherche de solution + corrections visuelles

master
cldupland 5 years ago
parent 6006856012
commit 1f50fb953d

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="15" android:versionName="5.1" package="com.uca.thegameextreme" android:installLocation="auto">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="16" android:versionName="5.2" package="com.uca.thegameextreme" android:installLocation="auto">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28" />
<application android:icon="@drawable/TrierImageB" android:label="OrderStacks"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

@ -29,5 +29,15 @@ namespace TheGameExtreme.model
players.Add(player);
}
}
public string getScore()
{
int score = GameMode.getScore();
players.ForEach(player =>
{
score += player.getCardList().Count;
});
return score.ToString();
}
}
}

@ -112,9 +112,9 @@ namespace TheGameExtreme.model.gameActions.abstractRules
public abstract void TestEndGame(List<Card> currentHand);
public string getScore()
public int getScore()
{
return deck.size().ToString();
return deck.size();
}
}
}

@ -4,6 +4,7 @@ using TheGameExtreme.model.card;
using TheGameExtreme.model.deck;
using TheGameExtreme.model.gameActions.abstractRules;
using TheGameExtreme.model.piles;
using TheGameExtreme.Resx;
namespace TheGameExtreme.model.gameActions.classic
{

@ -104,7 +104,7 @@ namespace TheGameExtreme.model.manager
{
if(parametreur.GameMode.endTurn(currentHand, CurrentCardPlayed, parametreur.players[currentIndexPlayer]))
{
EndMessage = parametreur.GameMode.Message + "Il vous restait " + parametreur.GameMode.getScore() + " cartes à jouer!";
EndMessage = parametreur.GameMode.Message + "Il vous restait " + parametreur.getScore() + " cartes à jouer!";
return true;
}
else
@ -112,6 +112,7 @@ namespace TheGameExtreme.model.manager
EndMessage = parametreur.GameMode.Message;
if (win)
{
EndMessage = AppResources.StrWin;
OnEndGame(this, new EventArgs());
return true;
}

@ -105,7 +105,7 @@ namespace TheGameExtreme.view
{
Placeholder = "Pseudo",
BackgroundColor = (Color)Application.Current.Resources["Gold"],
WidthRequest = 200,
WidthRequest = 150,
MinimumWidthRequest = 50,
HorizontalOptions = LayoutOptions.Center,
MaxLength = 18,

@ -67,7 +67,6 @@
HorizontalOptions="End"
VerticalOptions="Center"
BackgroundColor="{DynamicResource Gold}"
HeightRequest="35"
Padding="10"
CornerRadius="10"
Clicked="EndTurn"/>

@ -326,11 +326,15 @@ namespace TheGameExtreme.view
private void OnEndGame(object sender, EventArgs args)
{
gameOption.Children.Clear();
Button retryButton = new Button();
retryButton.Text = AppResources.StrRetry;
retryButton.CornerRadius = 10;
Button retryButton = new Button()
{
Text = AppResources.StrRetry,
CornerRadius = 10,
BackgroundColor = (Color)Application.Current.Resources["Gold"],
VerticalOptions = LayoutOptions.Center,
HorizontalOptions = LayoutOptions.End
};
retryButton.Clicked += Retry;
retryButton.BackgroundColor = (Color)Application.Current.Resources["Gold"];
gameOption.Children.Add(retryButton);
}
@ -375,10 +379,16 @@ namespace TheGameExtreme.view
progressBar.Progress = 1f;
gameOption.Children.Clear();
Button button = new Button();
button.Text = AppResources.StrEndTurn;
Button button = new Button()
{
Padding = 10,
Text = AppResources.StrEndTurn,
BackgroundColor = (Color)Application.Current.Resources["Gold"],
CornerRadius = 10,
VerticalOptions = LayoutOptions.Center,
HorizontalOptions = LayoutOptions.End
};
button.Clicked += EndTurn;
button.BackgroundColor = (Color)Application.Current.Resources["Gold"];
gameOption.Children.Add(button);
}

Loading…
Cancel
Save