Gestion des placements

master
cldupland 5 years ago
parent f310a99634
commit ae6c4878ce

@ -5746,121 +5746,103 @@ namespace TheGameExtreme.Droid
public const int abc_vector_test = 2131165273; public const int abc_vector_test = 2131165273;
// aapt resource value: 0x7F07005A // aapt resource value: 0x7F07005A
public const int Apple = 2131165274; public const int ArrowSettingsBack = 2131165274;
// aapt resource value: 0x7F07005B // aapt resource value: 0x7F07005B
public const int ArrowSettingsBack = 2131165275; public const int avd_hide_password = 2131165275;
// aapt resource value: 0x7F07005C // aapt resource value: 0x7F07005C
public const int avd_hide_password = 2131165276; public const int avd_show_password = 2131165276;
// aapt resource value: 0x7F07005D // aapt resource value: 0x7F07005D
public const int avd_show_password = 2131165277; public const int design_bottom_navigation_item_background = 2131165277;
// aapt resource value: 0x7F07005E // aapt resource value: 0x7F07005E
public const int design_bottom_navigation_item_background = 2131165278; public const int design_fab_background = 2131165278;
// aapt resource value: 0x7F07005F // aapt resource value: 0x7F07005F
public const int design_fab_background = 2131165279; public const int design_ic_visibility = 2131165279;
// aapt resource value: 0x7F070060 // aapt resource value: 0x7F070060
public const int design_ic_visibility = 2131165280; public const int design_ic_visibility_off = 2131165280;
// aapt resource value: 0x7F070061 // aapt resource value: 0x7F070061
public const int design_ic_visibility_off = 2131165281; public const int design_password_eye = 2131165281;
// aapt resource value: 0x7F070062 // aapt resource value: 0x7F070062
public const int design_password_eye = 2131165282; public const int design_snackbar_background = 2131165282;
// aapt resource value: 0x7F070063 // aapt resource value: 0x7F070063
public const int design_snackbar_background = 2131165283; public const int EngrenageV1 = 2131165283;
// aapt resource value: 0x7F070064 // aapt resource value: 0x7F070064
public const int Engrenage = 2131165284; public const int HomeIcon = 2131165284;
// aapt resource value: 0x7F070065 // aapt resource value: 0x7F070065
public const int EngrenageV1 = 2131165285; public const int ic_mtrl_chip_checked_black = 2131165285;
// aapt resource value: 0x7F070066 // aapt resource value: 0x7F070066
public const int HomeIcon = 2131165286; public const int ic_mtrl_chip_checked_circle = 2131165286;
// aapt resource value: 0x7F07006A
public const int IconPique = 2131165290;
// aapt resource value: 0x7F070067 // aapt resource value: 0x7F070067
public const int ic_mtrl_chip_checked_black = 2131165287; public const int ic_mtrl_chip_close_circle = 2131165287;
// aapt resource value: 0x7F070068 // aapt resource value: 0x7F070068
public const int ic_mtrl_chip_checked_circle = 2131165288; public const int imagesRules = 2131165288;
// aapt resource value: 0x7F070069 // aapt resource value: 0x7F070069
public const int ic_mtrl_chip_close_circle = 2131165289; public const int mtrl_snackbar_background = 2131165289;
// aapt resource value: 0x7F07006A
public const int mtrl_tabs_default_indicator = 2131165290;
// aapt resource value: 0x7F07006B // aapt resource value: 0x7F07006B
public const int imagesRules = 2131165291; public const int navigation_empty_icon = 2131165291;
// aapt resource value: 0x7F07006C // aapt resource value: 0x7F07006C
public const int mtrl_snackbar_background = 2131165292; public const int notification_action_background = 2131165292;
// aapt resource value: 0x7F07006D // aapt resource value: 0x7F07006D
public const int mtrl_tabs_default_indicator = 2131165293; public const int notification_bg = 2131165293;
// aapt resource value: 0x7F07006E // aapt resource value: 0x7F07006E
public const int navigation_empty_icon = 2131165294; public const int notification_bg_low = 2131165294;
// aapt resource value: 0x7F07006F // aapt resource value: 0x7F07006F
public const int notification_action_background = 2131165295; public const int notification_bg_low_normal = 2131165295;
// aapt resource value: 0x7F070070 // aapt resource value: 0x7F070070
public const int notification_bg = 2131165296; public const int notification_bg_low_pressed = 2131165296;
// aapt resource value: 0x7F070071 // aapt resource value: 0x7F070071
public const int notification_bg_low = 2131165297; public const int notification_bg_normal = 2131165297;
// aapt resource value: 0x7F070072 // aapt resource value: 0x7F070072
public const int notification_bg_low_normal = 2131165298; public const int notification_bg_normal_pressed = 2131165298;
// aapt resource value: 0x7F070073 // aapt resource value: 0x7F070073
public const int notification_bg_low_pressed = 2131165299; public const int notification_icon_background = 2131165299;
// aapt resource value: 0x7F070074 // aapt resource value: 0x7F070074
public const int notification_bg_normal = 2131165300; public const int notification_template_icon_bg = 2131165300;
// aapt resource value: 0x7F070075 // aapt resource value: 0x7F070075
public const int notification_bg_normal_pressed = 2131165301; public const int notification_template_icon_low_bg = 2131165301;
// aapt resource value: 0x7F070076 // aapt resource value: 0x7F070076
public const int notification_icon_background = 2131165302; public const int notification_tile_bg = 2131165302;
// aapt resource value: 0x7F070077 // aapt resource value: 0x7F070077
public const int notification_template_icon_bg = 2131165303; public const int notify_panel_notification_icon_bg = 2131165303;
// aapt resource value: 0x7F070078 // aapt resource value: 0x7F070078
public const int notification_template_icon_low_bg = 2131165304; public const int tooltip_frame_dark = 2131165304;
// aapt resource value: 0x7F070079 // aapt resource value: 0x7F070079
public const int notification_tile_bg = 2131165305; public const int tooltip_frame_light = 2131165305;
// aapt resource value: 0x7F07007A // aapt resource value: 0x7F07007A
public const int notify_panel_notification_icon_bg = 2131165306; public const int TrierImageB = 2131165306;
// aapt resource value: 0x7F07007B
public const int rules = 2131165307;
// aapt resource value: 0x7F07007C
public const int rulesImg = 2131165308;
// aapt resource value: 0x7F07007D
public const int tooltip_frame_dark = 2131165309;
// aapt resource value: 0x7F07007E
public const int tooltip_frame_light = 2131165310;
// aapt resource value: 0x7F07007F
public const int TrierImageB = 2131165311;
// aapt resource value: 0x7F070080
public const int UsersExiticon = 2131165312;
static Drawable() static Drawable()
{ {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

@ -81,12 +81,6 @@
<None Include="Properties\AndroidManifest.xml" /> <None Include="Properties\AndroidManifest.xml" />
<AndroidResource Include="Resources\drawable\FontStyle\IndieFlower.ttf" /> <AndroidResource Include="Resources\drawable\FontStyle\IndieFlower.ttf" />
<AndroidResource Include="Resources\drawable\FontStyle\LicenceFont.pdf" /> <AndroidResource Include="Resources\drawable\FontStyle\LicenceFont.pdf" />
<AndroidResource Include="Resources\drawable\IconPique.ico">
<SubType>
</SubType>
<Generator>
</Generator>
</AndroidResource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<AndroidResource Include="Resources\layout\Tabbar.xml" /> <AndroidResource Include="Resources\layout\Tabbar.xml" />
@ -105,15 +99,6 @@
<AndroidResource Include="Resources\mipmap-xxhdpi\launcher_foreground.png" /> <AndroidResource Include="Resources\mipmap-xxhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\icon.png" /> <AndroidResource Include="Resources\mipmap-xxxhdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\launcher_foreground.png" /> <AndroidResource Include="Resources\mipmap-xxxhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\drawable\Apple.png">
<SubType>
</SubType>
<Generator>
</Generator>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\Engrenage.jpeg" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\TheGameExtreme\TheGameExtreme.csproj"> <ProjectReference Include="..\TheGameExtreme\TheGameExtreme.csproj">
@ -130,27 +115,15 @@
<ItemGroup> <ItemGroup>
<AndroidResource Include="Resources\drawable\EngrenageV1.png" /> <AndroidResource Include="Resources\drawable\EngrenageV1.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\rulesImg.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\rules.png" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<AndroidResource Include="Resources\drawable\imagesRules.png" /> <AndroidResource Include="Resources\drawable\imagesRules.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<AndroidResource Include="Resources\drawable\ArrowSettingsBack.png" /> <AndroidResource Include="Resources\drawable\ArrowSettingsBack.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\UsersExiticon.png" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<AndroidResource Include="Resources\drawable\HomeIcon.png" /> <AndroidResource Include="Resources\drawable\HomeIcon.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\TrierImageB.png" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<AndroidResource Include="Resources\drawable\TrierImageB.png"> <AndroidResource Include="Resources\drawable\TrierImageB.png">
<Generator>MSBuild:UpdateGeneratedFiles</Generator> <Generator>MSBuild:UpdateGeneratedFiles</Generator>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

@ -79,12 +79,10 @@
<BundleResource Include="Resources\FontStyle\IndieFlower.ttf" /> <BundleResource Include="Resources\FontStyle\IndieFlower.ttf" />
<BundleResource Include="Resources\FontStyle\ENSOTYPE License &amp; FAQ - DO READ THIS!.pdf" /> <BundleResource Include="Resources\FontStyle\ENSOTYPE License &amp; FAQ - DO READ THIS!.pdf" />
<BundleResource Include="Resources\FontStyle\Ruhaniyat DEMO.otf" /> <BundleResource Include="Resources\FontStyle\Ruhaniyat DEMO.otf" />
<BundleResource Include="Resources\Apple.png"> <BundleResource Include="Resources\EngrenageV1.png" />
<LogicalName>TheGameExtreme.iOS.Resources.Apple.png</LogicalName> <BundleResource Include="Resources\imagesRules.png" />
</BundleResource> <BundleResource Include="Resources\TrierImageB.ico" />
<BundleResource Include="Resources\IconPique.ico" /> <BundleResource Include="TrierImageB.ico" />
<BundleResource Include="Resources\IconPique60ptmax.ico" />
<BundleResource Include="IconPique.ico" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<InterfaceDefinition Include="Resources\LaunchScreen.storyboard" /> <InterfaceDefinition Include="Resources\LaunchScreen.storyboard" />
@ -141,29 +139,12 @@
<Name>TheGameExtreme</Name> <Name>TheGameExtreme</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\Engrenage.jpeg" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<BundleResource Include="Resources\FontStyle\SIL Open Font License.txt" /> <BundleResource Include="Resources\FontStyle\SIL Open Font License.txt" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\rulesImg.png" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\rules.png" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<BundleResource Include="Resources\ArrowSettingsBack.png" /> <BundleResource Include="Resources\ArrowSettingsBack.png" />
<BundleResource Include="Resources\UsersExiticon.png" />
<BundleResource Include="Resources\HomeIcon.png" /> <BundleResource Include="Resources\HomeIcon.png" />
<BundleResource Include="Resources\TrierImage.ico" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\TrierImageB.ico" />
</ItemGroup>
<ItemGroup>
<Content Include="TrierImageB.ico" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ITunesArtwork Include="iTunesArtwork" /> <ITunesArtwork Include="iTunesArtwork" />

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.uca.thegameextreme" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application android:label="TheGameExtreme.Android" android:icon="@drawable/IconPique.jpg" android:name="android.app.Application" android:allowBackup="true" android:debuggable="true">
<activity android:configChanges="orientation|screenSize" android:label="TheGameExtreme" android:screenOrientation="landscape" android:theme="@style/MainTheme" android:name="md5c076201c8182e8540d3c086a8691f158.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="md5dcb6eccdc824e0677ffae8ccdde42930.KeepAliveService" />
<receiver android:enabled="true" android:exported="false" android:label="Essentials Battery Broadcast Receiver" android:name="md5d630c3d3bfb5f5558520331566132d97.BatteryBroadcastReceiver" />
<receiver android:enabled="true" android:exported="false" android:label="Essentials Energy Saver Broadcast Receiver" android:name="md5d630c3d3bfb5f5558520331566132d97.EnergySaverBroadcastReceiver" />
<receiver android:enabled="true" android:exported="false" android:label="Essentials Connectivity Broadcast Receiver" android:name="md5d630c3d3bfb5f5558520331566132d97.ConnectivityBroadcastReceiver" />
<provider android:authorities="com.uca.thegameextreme.fileProvider" android:exported="false" android:grantUriPermissions="true" android:name="xamarin.essentials.fileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/xamarin_essentials_fileprovider_file_paths" />
</provider>
<receiver android:enabled="true" android:exported="false" android:name="md51558244f76c53b6aeda52c8a337f2c37.PowerSaveModeBroadcastReceiver" />
<provider android:name="mono.MonoRuntimeProvider" android:exported="false" android:initOrder="1999999999" android:authorities="com.uca.thegameextreme.mono.MonoRuntimeProvider.__mono_init__" />
<!--suppress ExportedReceiver-->
<receiver android:name="mono.android.Seppuku">
<intent-filter>
<action android:name="mono.android.intent.action.SEPPUKU" />
<category android:name="mono.android.intent.category.SEPPUKU.com.uca.thegameextreme" />
</intent-filter>
</receiver>
</application>
</manifest>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 KiB

After

Width:  |  Height:  |  Size: 360 KiB

@ -40,7 +40,11 @@ namespace TheGameExtreme.model.gameActions.classic
} }
else else
{ {
Message = ((JouerUneCarteClassic)gameActions[1]).ErrorMessage; TestEndGame(currentHand);
if (!end)
{
Message = ((JouerUneCarteClassic)gameActions[1]).ErrorMessage;
}
return false; return false;
} }
} }

@ -40,7 +40,11 @@ namespace TheGameExtreme.model.gameActions.decimals
} }
else else
{ {
Message = ((JouerUneCarteDecimal)gameActions[1]).ErrorMessage; TestEndGame(currentHand);
if (!end)
{
Message = ((JouerUneCarteDecimal)gameActions[1]).ErrorMessage;
}
return false; return false;
} }
} }

@ -40,7 +40,11 @@ namespace TheGameExtreme.model.gameActions.fraction
} }
else else
{ {
Message = ((JouerUneCarteFraction)gameActions[1]).ErrorMessage; TestEndGame(currentHand);
if (!end)
{
Message = ((JouerUneCarteFraction)gameActions[1]).ErrorMessage;
}
return false; return false;
} }
} }

@ -21,31 +21,26 @@
<StackLayout <StackLayout
Grid.Row="0" Grid.Row="0"
Grid.Column="0"> Grid.Column="0"
<ImageButton Source="ArrowSettingsBack.png" Orientation="Horizontal">
<ImageButton
Source="ArrowSettingsBack.png"
VerticalOptions="Start" VerticalOptions="Start"
HorizontalOptions="StartAndExpand" HorizontalOptions="StartAndExpand"
HeightRequest="40" HeightRequest="40"
WidthRequest="50" WidthRequest="50"
Clicked="Back" Clicked="Back"
BackgroundColor="Transparent" BackgroundColor="Transparent"/>
Margin="10,5,0,0"/>
</StackLayout>
<StackLayout
Grid.Row="0"
Grid.Column="0">
<Button <Button
Text="{x:Static resources:AppResources.StrBtnPlay}" Text="{x:Static resources:AppResources.StrBtnPlay}"
Clicked="Play" Clicked="Play"
VerticalOptions="Start"
HorizontalOptions="End" HorizontalOptions="End"
MinimumWidthRequest="30" MinimumWidthRequest="30"
WidthRequest="100" WidthRequest="100"
BackgroundColor="{DynamicResource Gold}" BackgroundColor="{DynamicResource Gold}"
CornerRadius="10" CornerRadius="10"/>
Margin="0,5,10,0"/>
</StackLayout> </StackLayout>

@ -43,6 +43,7 @@ namespace TheGameExtreme.view
IOGamePreparation.SaveParameterGamePreparationNbCards(SelectNbCard.SelectedIndex); IOGamePreparation.SaveParameterGamePreparationNbCards(SelectNbCard.SelectedIndex);
await Navigation.PopAsync(); await Navigation.PopAsync();
} }
protected override bool OnBackButtonPressed() protected override bool OnBackButtonPressed()
{ {
IOGamePreparation.SaveParamaterGamePreparationNbPlayers(PlayerSelecter.SelectedIndex); IOGamePreparation.SaveParamaterGamePreparationNbPlayers(PlayerSelecter.SelectedIndex);

@ -7,83 +7,80 @@
xmlns:resources="clr-namespace:TheGameExtreme.Resx" xmlns:resources="clr-namespace:TheGameExtreme.Resx"
x:Class="TheGameExtreme.view.HomePage"> x:Class="TheGameExtreme.view.HomePage">
<StackLayout BackgroundColor="Transparent"> <Grid
Margin="5,5,5,5">
<Grid> <Grid.ColumnDefinitions>
<ColumnDefinition Width="15*"/>
<ColumnDefinition Width="70*"/>
<ColumnDefinition Width="15*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="31*"/>
<RowDefinition Height="23*"/>
<RowDefinition Height="23*"/>
<RowDefinition Height="23*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Label
<ColumnDefinition Width="15*"/> Text="{x:Static resources:AppResources.StrTitle}"
<ColumnDefinition Width="70*"/> TextColor="{DynamicResource WhiteColor}"
<ColumnDefinition Width="15*"/> Grid.Row="0"
</Grid.ColumnDefinitions> Grid.Column="1"
<Grid.RowDefinitions> HorizontalTextAlignment="Center"
<RowDefinition Height="19*"/> FontSize="45"
<RowDefinition Height="27*"/> VerticalTextAlignment="Start"
<RowDefinition Height="27*"/> FontFamily=""/>
<RowDefinition Height="27*"/>
</Grid.RowDefinitions>
<Label <ImageButton
Text="{x:Static resources:AppResources.StrTitle}" Source="EngrenageV1.png"
TextColor="{DynamicResource WhiteColor}" Grid.Row="0"
Grid.Row="0" Grid.Column="1" Grid.Column="2"
HorizontalTextAlignment="Center" VerticalOptions="StartAndExpand"
FontSize="35" HorizontalOptions="End"
VerticalTextAlignment="Center" HeightRequest="60"
FontFamily=""/> WidthRequest="68"
Clicked="OpenSetting"
BackgroundColor="{DynamicResource BlackColor}"/>
<ImageButton <Button
Source="EngrenageV1.jpeg" Text="{x:Static resources:AppResources.StrLocalGame}"
Grid.Row="0" Grid.Column="2" FontSize="18"
VerticalOptions="CenterAndExpand" Grid.Row="1"
HorizontalOptions="End" Grid.Column="1"
HeightRequest="60" HorizontalOptions="Center"
WidthRequest="68" WidthRequest="230"
Clicked="OpenSetting" HeightRequest="57"
BackgroundColor="{DynamicResource BlackColor}"/> VerticalOptions="Center"
Clicked="OpenGame"
CornerRadius="10"
BackgroundColor="{DynamicResource SkyBlueColor}"/>
<Button
Text="{x:Static resources:AppResources.StrLocalGame}"
FontSize="18"
Grid.Row="1"
Grid.Column="1"
HorizontalOptions="Center"
WidthRequest="230"
HeightRequest="57"
VerticalOptions="Center"
Clicked="OpenGame"
CornerRadius="10"
Margin="15"
BackgroundColor="{DynamicResource SkyBlueColor}"/>
<Button
Text="{x:Static resources:AppResources.StrMultiplayer}"
FontSize="18"
Grid.Row="2"
Grid.Column="1"
HorizontalOptions="Center"
VerticalOptions="Center"
HeightRequest="57"
WidthRequest="230"
Clicked="OpenMultiPlayerMode"
CornerRadius="10"
BackgroundColor="{DynamicResource SkyBlueColor}"/>
<Button <ImageButton
Text="{x:Static resources:AppResources.StrMultiplayer}" Source="imagesRules.png"
FontSize="18" Grid.Column="0"
Grid.Row="2" Grid.Row="0"
Grid.Column="1" HeightRequest="50"
HorizontalOptions="Center" WidthRequest="35"
VerticalOptions="Center" VerticalOptions="StartAndExpand"
HeightRequest="57" HorizontalOptions="Start"
WidthRequest="230" Clicked="Rules_Clicked"
Clicked="OpenMultiPlayerMode" BackgroundColor="{DynamicResource BlackColor}"/>
CornerRadius="10"
Margin="15"
BackgroundColor="{DynamicResource SkyBlueColor}"/>
<ImageButton </Grid>
Source="imagesRules.png"
Grid.Column="0"
Grid.Row="0"
HeightRequest="50"
WidthRequest="35"
VerticalOptions="CenterAndExpand"
HorizontalOptions="Start"
Clicked="Rules_Clicked"
BackgroundColor="{DynamicResource BlackColor}"/>
</Grid>
</StackLayout>
</ContentPage> </ContentPage>

@ -12,7 +12,8 @@
x:Class="TheGameExtreme.view.MainPage"> x:Class="TheGameExtreme.view.MainPage">
<Grid <Grid
x:Name="Display"> x:Name="Display"
Margin="10,10,10,10">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="10*"/> <RowDefinition Height="10*"/>
<RowDefinition Height="90*"/> <RowDefinition Height="90*"/>

@ -7,8 +7,6 @@ using SkiaSharp;
using SkiaSharp.Views.Forms; using SkiaSharp.Views.Forms;
using TouchTracking; using TouchTracking;
using Xamarin.Essentials; using Xamarin.Essentials;
using System.IO;
using System.Reflection;
using TheGameExtreme.Resx; using TheGameExtreme.Resx;
namespace TheGameExtreme.view namespace TheGameExtreme.view
@ -197,29 +195,26 @@ namespace TheGameExtreme.view
stackCollection.Clear(); stackCollection.Clear();
SKPaint textPaint = new SKPaint(); SKPaint textPaint = new SKPaint();
SKPoint position = new SKPoint((float)((DeviceDisplay.MainDisplayInfo.Width * 0.9) / (viewmodel.getListOrderedStacks().Count * 2)) + (float)(DeviceDisplay.MainDisplayInfo.Width * 0.01), (float)((DeviceDisplay.MainDisplayInfo.Height * 0.1) + (DeviceDisplay.MainDisplayInfo.Height * 0.9) * 0.01 + 2 * (0.05f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("001")))); SKPoint position = new SKPoint((float)((DeviceDisplay.MainDisplayInfo.Width) / (viewmodel.getListOrderedStacks().Count * 2)), (float)((DeviceDisplay.MainDisplayInfo.Height * 0.1) + (DeviceDisplay.MainDisplayInfo.Height * 0.9) * 0.01 + 2 * (0.05f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("001"))));
float inflateWidth; float inflateWidth;
if (indexMode == 4 || indexMode == 3) if (indexMode == 4 || indexMode == 3)
{ {
inflateWidth = 0.02f * (float)DeviceDisplay.MainDisplayInfo.Width; inflateWidth = 0.01f * (float)DeviceDisplay.MainDisplayInfo.Width;
} }
else else
{ {
inflateWidth = 0.02f * (float)DeviceDisplay.MainDisplayInfo.Width; inflateWidth = 0.02f * (float)DeviceDisplay.MainDisplayInfo.Width;
} }
position.X -= inflateWidth;
for (int i = 0; i < viewmodel.getListOrderedStacks().Count; i++) for (int i = 0; i < viewmodel.getListOrderedStacks().Count; i++)
{ {
textPaint = new SKPaint(); textPaint = new SKPaint();
float textWidth; float textWidth;
if (indexMode == 2 || indexMode == 5) if (indexMode == 3)
{
textWidth = textPaint.MeasureText("00");
textPaint.TextSize = 0.04f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("00");
}
else if (indexMode == 3)
{ {
textWidth = textPaint.MeasureText("000"); textWidth = textPaint.MeasureText("000");
textPaint.TextSize = 0.04f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("000"); textPaint.TextSize = 0.04f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("000");
@ -231,8 +226,8 @@ namespace TheGameExtreme.view
} }
else else
{ {
textWidth = textPaint.MeasureText("00");
textPaint.TextSize = 0.04f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("00"); textPaint.TextSize = 0.04f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("00");
textWidth = textPaint.MeasureText(viewmodel.getListOrderedStacks()[i].Peek().Value.ToString());
} }
position.X -= textWidth * 0.5f; position.X -= textWidth * 0.5f;
@ -243,7 +238,7 @@ namespace TheGameExtreme.view
InitialPoint = position InitialPoint = position
}); });
position.X += (float)((DeviceDisplay.MainDisplayInfo.Width * 0.9) / viewmodel.getListOrderedStacks().Count) + textWidth * 0.5f; position.X += (float)((DeviceDisplay.MainDisplayInfo.Width) / viewmodel.getListOrderedStacks().Count);
} }
} }
@ -254,7 +249,7 @@ namespace TheGameExtreme.view
private void InflateHand() private void InflateHand()
{ {
SKPaint textPaint = new SKPaint(); SKPaint textPaint = new SKPaint();
SKPoint position = new SKPoint((float)((DeviceDisplay.MainDisplayInfo.Width * 0.9) / (viewmodel.CurrentHand.Count * 2)) + (float)(DeviceDisplay.MainDisplayInfo.Width * 0.01), (float)((DeviceDisplay.MainDisplayInfo.Height * 0.9) - (DeviceDisplay.MainDisplayInfo.Height * 0.9) * 0.1 - 2 * (0.05f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("001")))); SKPoint position = new SKPoint((float)((DeviceDisplay.MainDisplayInfo.Width) / (viewmodel.CurrentHand.Count * 2)), (float)((DeviceDisplay.MainDisplayInfo.Height * 0.9) - (DeviceDisplay.MainDisplayInfo.Height * 0.9) * 0.1 - 2 * (0.05f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("001"))));
float inflateWidth; float inflateWidth;
if (indexMode == 4 || indexMode == 3) if (indexMode == 4 || indexMode == 3)
@ -266,17 +261,14 @@ namespace TheGameExtreme.view
inflateWidth = 0.015f * (float)DeviceDisplay.MainDisplayInfo.Width; inflateWidth = 0.015f * (float)DeviceDisplay.MainDisplayInfo.Width;
} }
position.X -= inflateWidth;
for (int i = 0; i < viewmodel.CurrentHand.Count; i++) for (int i = 0; i < viewmodel.CurrentHand.Count; i++)
{ {
textPaint = new SKPaint(); textPaint = new SKPaint();
float textWidth; float textWidth;
if (indexMode == 2 || indexMode == 5) if (indexMode == 3)
{
textWidth = textPaint.MeasureText("00");
textPaint.TextSize = 0.048f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("00");
}
else if (indexMode == 3)
{ {
textWidth = textPaint.MeasureText("000"); textWidth = textPaint.MeasureText("000");
textPaint.TextSize = 0.048f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("000"); textPaint.TextSize = 0.048f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("000");
@ -288,8 +280,8 @@ namespace TheGameExtreme.view
} }
else else
{ {
textWidth = textPaint.MeasureText("00");
textPaint.TextSize = 0.048f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("00"); textPaint.TextSize = 0.048f * (float)DeviceDisplay.MainDisplayInfo.Width * textPaint.TextSize / textPaint.MeasureText("00");
textWidth = textPaint.MeasureText(viewmodel.CurrentHand[i].Value.ToString());
} }
position.X -= textWidth * 0.5f; position.X -= textWidth * 0.5f;
@ -300,7 +292,7 @@ namespace TheGameExtreme.view
InitialPoint = position InitialPoint = position
}); });
position.X += (float)((DeviceDisplay.MainDisplayInfo.Width * 0.9) / viewmodel.CurrentHand.Count) + textWidth * 0.5f; position.X += (float)((DeviceDisplay.MainDisplayInfo.Width) / viewmodel.CurrentHand.Count);
} }
} }
@ -316,7 +308,7 @@ namespace TheGameExtreme.view
Button retryButton = new Button(); Button retryButton = new Button();
retryButton.Text = "Retry"; retryButton.Text = "Retry";
retryButton.Clicked += Retry; retryButton.Clicked += Retry;
retryButton.BackgroundColor = (Color)Application.Current.Resources["SkyBlueColor"]; retryButton.BackgroundColor = (Color)Application.Current.Resources["Gold"];
gameOption.Children.Add(retryButton); gameOption.Children.Add(retryButton);
} }
@ -347,6 +339,8 @@ namespace TheGameExtreme.view
viewmodel.EndGame += OnEndGame; viewmodel.EndGame += OnEndGame;
viewmodel.AlertChanged += OnAlertChanged;
pseudo.SetBinding(Label.TextProperty, new Binding("Pseudo", source: viewmodel)); pseudo.SetBinding(Label.TextProperty, new Binding("Pseudo", source: viewmodel));
textCollection.Clear(); textCollection.Clear();
@ -358,8 +352,8 @@ namespace TheGameExtreme.view
gameOption.Children.Clear(); gameOption.Children.Clear();
Button button = new Button(); Button button = new Button();
button.Text = AppResources.StrEndTurn; button.Text = AppResources.StrEndTurn;
button.Clicked += Retry; button.Clicked += EndTurn;
button.BackgroundColor = (Color)Application.Current.Resources["SkyBlueColor"]; button.BackgroundColor = (Color)Application.Current.Resources["Gold"];
gameOption.Children.Add(button); gameOption.Children.Add(button);
} }

@ -33,7 +33,7 @@ namespace TheGameExtreme.view
this.textPaint = textPaint; this.textPaint = textPaint;
Value = value; Value = value;
this.width = width; this.width = width;
height = 2f * this.width; height = (0.2f * (float)DeviceDisplay.MainDisplayInfo.Height - textPaint.TextSize) * 0.5f;
if (Value.View.GetType() == typeof(FractionCard)) if (Value.View.GetType() == typeof(FractionCard))
{ {
@ -49,7 +49,7 @@ namespace TheGameExtreme.view
{ {
if (Value.Value.CompareTo(-10m) <= 0) if (Value.Value.CompareTo(-10m) <= 0)
{ {
this.width -= textPaint.MeasureText("0") * 0.5f; this.width -= textPaint.MeasureText("0") * 0.25f;
} }
if (Value.Value.CompareTo(0m) >= 0 && Value.Value.CompareTo(10) < 0) if (Value.Value.CompareTo(0m) >= 0 && Value.Value.CompareTo(10) < 0)
{ {
@ -109,16 +109,16 @@ namespace TheGameExtreme.view
canvas.DrawRect(card, textPaint1); canvas.DrawRect(card, textPaint1);
if (((FractionCard)Value.View).Fraction.Numerateur < 10 && ((FractionCard)Value.View).Fraction.Numerateur > 0) if (((FractionCard)Value.View).Fraction.Numerateur < 10 && ((FractionCard)Value.View).Fraction.Numerateur > 0)
{ {
canvas.DrawText(((FractionCard)Value.View).Fraction.Numerateur.ToString(), textPaint.MeasureText(((FractionCard)Value.View).Fraction.Numerateur.ToString()) * 0.5f, -50, textPaint); canvas.DrawText(((FractionCard)Value.View).Fraction.Numerateur.ToString(), textPaint.MeasureText(((FractionCard)Value.View).Fraction.Numerateur.ToString()) * 0.5f, - textPaint.TextSize * 0.5f - height * 0.5f, textPaint);
} }
else else
{ {
canvas.DrawText(((FractionCard)Value.View).Fraction.Numerateur.ToString(), 0, -50, textPaint); canvas.DrawText(((FractionCard)Value.View).Fraction.Numerateur.ToString(), 0, - textPaint.TextSize * 0.5f - height * 0.5f, textPaint);
} }
canvas.DrawText("__", textPaint.MeasureText("__") * 0.1f, -textPaint.TextSize * 0.4f, textPaint1); canvas.DrawText("__", textPaint.MeasureText("__") * 0.1f, -textPaint.TextSize * 0.6f, textPaint1);
if (((FractionCard)Value.View).Fraction.Denominateur < 10 && ((FractionCard)Value.View).Fraction.Denominateur > 0) if (((FractionCard)Value.View).Fraction.Denominateur < 10 && ((FractionCard)Value.View).Fraction.Denominateur > 0)
{ {
canvas.DrawText(((FractionCard)Value.View).Fraction.Denominateur.ToString(), textPaint.MeasureText(((FractionCard)Value.View).Fraction.Denominateur.ToString()) * 0.5f, 50, textPaint2); canvas.DrawText(((FractionCard)Value.View).Fraction.Denominateur.ToString(), textPaint.MeasureText(((FractionCard)Value.View).Fraction.Denominateur.ToString()) * 0.5f, height * 0.5f, textPaint2);
} }
else else
{ {

Loading…
Cancel
Save