merge dbCamille db
continuous-integration/drone/push Build is failing Details

master
Camille TURPIN-ETIENNE 11 months ago
commit a69e5fc9d2

@ -1,4 +1,5 @@
using CoreLibrary.Joueurs; using CoreLibrary.Joueurs;
using CoreLibrary;
using CoreLibrary.Regles; using CoreLibrary.Regles;
namespace CoreLibrary.Manager namespace CoreLibrary.Manager
@ -8,6 +9,14 @@ namespace CoreLibrary.Manager
private Joueur[] joueurs = []; private Joueur[] joueurs = [];
public IReadOnlyList<Joueur> Joueurs => Array.AsReadOnly(joueurs); public IReadOnlyList<Joueur> Joueurs => Array.AsReadOnly(joueurs);
public Partie Partie { get; private set; }
public Manager()
{
Partie = new Partie(new ReglesClassiques());
}
public void Charger() public void Charger()
{ {
joueurs = [ joueurs = [

@ -10,7 +10,7 @@ namespace CoreLibrary
/// </summary> /// </summary>
public class Partie public class Partie
{ {
private readonly IRegles regles; public IRegles Regles { get; private set; }
/// <summary> /// <summary>

@ -37,4 +37,8 @@
Title="Egalite" Title="Egalite"
ContentTemplate="{DataTemplate pages:Egalite}" /> ContentTemplate="{DataTemplate pages:Egalite}" />
<ShellContent
Title="Plateau"
ContentTemplate="{DataTemplate pages:Plateau}" />
</Shell> </Shell>

@ -1,4 +1,5 @@
using CoreLibrary.Manager; using CoreLibrary.Events;
using CoreLibrary.Manager;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace MauiSpark namespace MauiSpark
@ -10,6 +11,9 @@ namespace MauiSpark
public static MauiApp CreateMauiApp() public static MauiApp CreateMauiApp()
{ {
Manager.Charger(); Manager.Charger();
Manager.Partie.Jouer();
Manager.Partie.DemanderJoueur += (Object? sender, DemanderJoueurEventArgs e) => null;
var builder = MauiApp.CreateBuilder(); var builder = MauiApp.CreateBuilder();
builder builder

@ -79,6 +79,9 @@
<MauiXaml Update="Pages\Egaliter.xaml"> <MauiXaml Update="Pages\Egaliter.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="Pages\Plateau.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Pages\Regle.xaml"> <MauiXaml Update="Pages\Regle.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>

@ -0,0 +1,38 @@
<?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="MauiSpark.Pages.Plateau"
Title="Plateau">
<Grid RowDefinitions="*" ColumnDefinitions="*, *">
<Grid RowDefinitions="*" ColumnDefinitions="*" Margin="50" BackgroundColor="Red">
<ListView ItemsSource="{Binding Partie.Regles.TourMaximum}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid ColumnDefinitions="*, 5*" RowDefinitions="*">
<Label Grid.Column="0" Text="A" />
<Label Grid.Column="1" Text="B"/>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
<Grid Grid.Column="1" RowDefinitions="*, 2*, *" ColumnDefinitions="*" Margin="50" BackgroundColor="Blue">
<Label Text="Joueur 1" VerticalOptions="Center" HorizontalOptions="Center"/>
<Grid Grid.Row="1" RowDefinitions="*, 2*" ColumnDefinitions="*" VerticalOptions="Center" HorizontalOptions="Center">
<Grid RowDefinitions="*" ColumnDefinitions="*, *, *, *, *, *">
</Grid>
<Grid Grid.Row="1" RowDefinitions="*, *" ColumnDefinitions="*, *, *">
</Grid>
</Grid>
<Label Grid.Row="2" Text="Coup 5" VerticalOptions="Center" HorizontalOptions="Center"/>
</Grid>
</Grid>
</ContentPage>

@ -0,0 +1,17 @@
using CoreLibrary.Events;
using CoreLibrary.Manager;
namespace MauiSpark.Pages;
public partial class Plateau : ContentPage
{
public Plateau()
{
InitializeComponent();
}
public void NouveauTour(Object? sender, NouveauTourEventArgs e)
{
BindingContext = e;
}
}

@ -1,9 +1,5 @@
using CoreLibrary.Events;
using CoreLibrary.Joueurs; using CoreLibrary.Joueurs;
using CoreLibrary.Manager; using CoreLibrary.Manager;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace MauiSpark.Views; namespace MauiSpark.Views;

Loading…
Cancel
Save