page score regle et defaite

master
Camille TURPIN-ETIENNE 1 year ago
parent 97d26ca37c
commit f7170340d4

@ -16,5 +16,13 @@
Title="TableauScore" Title="TableauScore"
ContentTemplate="{DataTemplate pages:TableauScore}" ContentTemplate="{DataTemplate pages:TableauScore}"
Route="Pages.TableauScore" /> Route="Pages.TableauScore" />
<ShellContent
Title="Regle"
ContentTemplate="{DataTemplate pages:Regle}"
Route="Pages.Regle" />
<ShellContent
Title="Defaite"
ContentTemplate="{DataTemplate pages:Defaite}"
Route="Pages.Defaite" />
</TabBar> </TabBar>
</Shell> </Shell>

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="mastermind.Pages.Defaite"
xmlns:pages="clr-namespace:mastermind.Pages"
Title="Defaite">
<VerticalStackLayout>
</VerticalStackLayout>
</ContentPage>

@ -0,0 +1,9 @@
namespace mastermind.Pages;
public partial class Defaite : ContentPage
{
public Defaite()
{
InitializeComponent();
}
}

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="mastermind.Pages.Regle"
xmlns:pages="clr-namespace:mastermind.Pages"
Title="Regle">
<ScrollView>
<VerticalStackLayout>
<FlexLayout Direction="Row" JustifyContent="SpaceAround">
<Image Source="livre.png" WidthRequest="100" HorizontalOptions="End" VerticalOptions="Center" Margin="10"/>
<Frame BorderColor="Black" CornerRadius="5" BackgroundColor="Black" Margin="10" HorizontalOptions="Center" VerticalOptions="Center">
<Label Text="Régle" HorizontalOptions="Center" FontSize="75" VerticalOptions="Start" Margin="0,10,0,10" TextColor="White" />
</Frame>
<Grid RowDefinitions="auto,auto">
<Button Grid.Row="0" Style="{StaticResource ButtonFermeture}"/>
<Image Grid.Row="1" Source="livre.png" WidthRequest="100" HorizontalOptions="Start" VerticalOptions="Center" Margin="10"/>
</Grid>
</FlexLayout>
<Frame BackgroundColor="LightGray" Margin="20">
<Grid ColumnDefinitions="*,auto">
<Label Text="
Le but du jeu est de découvrir la combinaison. On génère aléatoirement deux combinaisons de 4 couleurs (six couleurs au total : jaune, bleu, rouge, vert, blanc et noir), une combinaison pour chaque joueur.
Deux joueurs se battent pour trouver la combinaison en premier, il y a douze tours.
Le premier joueur à trouver la combinaison à gagner, chaque joueur a le même nombre de coups à réaliser. Donc si le joueur un à trouvé la solution au bout de huit coups, le joueur deux doit finir son huitième coup. Si le joueur deux trouve la combinaison, les deux joueurs sont à égalité. Sinon, le joueur un gagne.
Pour trouver la combinaison, les joueurs disposent de quatre indicateurs. Ces indicateurs sont quatre ronds qui représentent les quatre couleurs sélectionnées par le joueur. Un rond noir signifie quune couleur est à la bonne place, un rond blanc correspond à une mauvaise place et s'il ny a pas dindicateur aucune des couleurs nest présentent dans la combinaison.
" />
<Image Source="mastermind.png" Grid.Column="1" MaximumHeightRequest="100" MaximumWidthRequest="100"/>
</Grid>
</Frame>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -0,0 +1,9 @@
namespace mastermind.Pages;
public partial class Regle : ContentPage
{
public Regle()
{
InitializeComponent();
}
}

@ -1,37 +1,42 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:mastermind.Pages" xmlns:pages="clr-namespace:mastermind.Pages"
xmlns:views="clr-namespace:mastermind.Views"
x:Class="mastermind.Pages.TableauScore" x:Class="mastermind.Pages.TableauScore"
Title="TableauScore"> Title="TableauScore">
<ScrollView> <ScrollView>
<VerticalStackLayout> <VerticalStackLayout>
<FlexLayout Direction="Row" JustifyContent="SpaceAround"> <FlexLayout Direction="Row" JustifyContent="SpaceAround">
<Image Source="star.png" WidthRequest="100" HorizontalOptions="End" VerticalOptions="Center"/> <Image Source="star.png" WidthRequest="100" HorizontalOptions="End" VerticalOptions="Center" Margin="10"/>
<Frame BorderColor="Black" CornerRadius="5" BackgroundColor="Black" Margin="10" HorizontalOptions="Center" VerticalOptions="Center"> <Frame BorderColor="Black" CornerRadius="5" BackgroundColor="Black" Margin="10" HorizontalOptions="Center" VerticalOptions="Center" >
<Label Text="Scoreboard" HorizontalOptions="Center" FontSize="75" VerticalOptions="Start" Margin="0,10,0,10" /> <Label Text="Scoreboard" HorizontalOptions="Center" FontSize="75" VerticalOptions="Start" Margin="0,10,0,10" TextColor="White" />
</Frame> </Frame>
<Image Source="star.png" WidthRequest="100" HorizontalOptions="Start" VerticalOptions="Center"/> <Grid RowDefinitions="auto,auto">
<Button Grid.Row="0" Style="{StaticResource ButtonFermeture}"/>
<Image Grid.Row="1" Source="star.png" WidthRequest="100" HorizontalOptions="Start" VerticalOptions="Center" Margin="10"/>
</Grid>
</FlexLayout> </FlexLayout>
<Frame Margin="5"> <Frame Margin="5" BorderColor="Black">
<Grid ColumnDefinitions="auto,*,auto,auto" ColumnSpacing="15"> <Grid ColumnDefinitions="auto,*,auto,auto" ColumnSpacing="15">
<Label Margin="5" Grid.Column="0" Text="RANK"></Label> <Button Margin="5" Grid.Column="0" Text="RANK" Style="{StaticResource ButtonTableau}"></Button>
<Label Margin="5" Grid.Column="1" Text="PSEUDO" ></Label> <Button Margin="5" Grid.Column="1" Text="PSEUDO" Style="{StaticResource ButtonTableau}" ></Button>
<Label Margin="5" Grid.Column="2" Text="Nombre de coût Moyen" ></Label> <Button Margin="5" Grid.Column="2" Text="Nombre de coût Moyen" Style="{StaticResource ButtonTableau}"></Button>
<Label Margin="5" Grid.Column="3" Text="POINT" ></Label> <Button Margin="5" Grid.Column="3" Text="POINT" Style="{StaticResource ButtonTableau}"></Button>
</Grid> </Grid>
</Frame> </Frame>
<local:CTableauScore/> <views:CTableauScore/>
<local:CTableauScore/> <views:CTableauScore/>
<local:CTableauScore/> <views:CTableauScore/>
<local:CTableauScore/> <views:CTableauScore/>
<local:CTableauScore/> <views:CTableauScore/>
<local:CTableauScore/> <views:CTableauScore/>
<local:CTableauScore/> <views:CTableauScore/>
<local:CTableauScore/> <views:CTableauScore/>
<local:CTableauScore/> <views:CTableauScore/>
<local:CTableauScore/> <views:CTableauScore/>
<views:CTableauScore/>
<views:CTableauScore/>
</VerticalStackLayout> </VerticalStackLayout>
</ScrollView> </ScrollView>

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 KiB

@ -49,6 +49,59 @@
</Setter> </Setter>
</Style> </Style>
<Style TargetType="Button" x:Key="ButtonTableau">
<Setter Property="TextColor" Value="Black" />
<Setter Property="BackgroundColor" Value="Transparent" />
<Setter Property="FontFamily" Value="OpenSansRegular"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="BorderWidth" Value="0"/>
<Setter Property="CornerRadius" Value="8"/>
<Setter Property="Padding" Value="14,10"/>
<Setter Property="MinimumHeightRequest" Value="44"/>
<Setter Property="MinimumWidthRequest" Value="44"/>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray600}}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="PointerOver" />
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style TargetType="Button" x:Key="ButtonFermeture">
<Setter Property="Text" Value="Quitter"/>
<Setter Property="TextColor" Value="White" />
<Setter Property="BackgroundColor" Value="DarkRed" />
<Setter Property="FontFamily" Value="OpenSansRegular"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="BorderWidth" Value="0"/>
<Setter Property="CornerRadius" Value="8"/>
<Setter Property="Padding" Value="14,10"/>
<Setter Property="MinimumHeightRequest" Value="20"/>
<Setter Property="MinimumWidthRequest" Value="20"/>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray600}}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="PointerOver" />
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style TargetType="CheckBox"> <Style TargetType="CheckBox">
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" /> <Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
<Setter Property="MinimumHeightRequest" Value="44"/> <Setter Property="MinimumHeightRequest" Value="44"/>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="mastermind.Pages.CTableauScore"> x:Class="mastermind.Views.CTableauScore">
<Frame BorderColor="Black" CornerRadius="5" Padding="0" BackgroundColor="Gray" VerticalOptions="Start" Margin="5" > <Frame BorderColor="Black" CornerRadius="5" Padding="0" BackgroundColor="Gray" VerticalOptions="Start" Margin="5" >
<Grid ColumnDefinitions="auto,*,auto,auto" ColumnSpacing="10"> <Grid ColumnDefinitions="auto,*,auto,auto" ColumnSpacing="10">

@ -1,4 +1,4 @@
namespace mastermind.Pages; namespace mastermind.Views;
public partial class CTableauScore : ContentView public partial class CTableauScore : ContentView
{ {

@ -72,7 +72,10 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<MauiXaml Update="Pages\CTableauScore.xaml"> <MauiXaml Update="Pages\Regle.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\CTableauScore.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="Pages\NewContent1.xaml"> <MauiXaml Update="Pages\NewContent1.xaml">

Loading…
Cancel
Save