You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
761 B
37 lines
761 B
using CoreLibrary.Joueurs;
|
|
using CoreLibrary.Manager;
|
|
|
|
namespace MauiSpark.Views;
|
|
|
|
internal class JoueurClassement
|
|
{
|
|
private Manager manager;
|
|
private Joueur joueur;
|
|
|
|
public Joueur Joueur
|
|
{
|
|
get => joueur;
|
|
private set => joueur = value;
|
|
}
|
|
|
|
public int Place
|
|
{
|
|
get => manager.Classement.IndexOf(Joueur) + 1;
|
|
}
|
|
|
|
public JoueurClassement(Joueur joueur, Manager manager)
|
|
{
|
|
this.manager = manager;
|
|
this.joueur = joueur;
|
|
}
|
|
}
|
|
|
|
public partial class CTableauScore : ContentView
|
|
{
|
|
public CTableauScore()
|
|
{
|
|
InitializeComponent();
|
|
|
|
BindingContext = MauiProgram.Manager.Classement.Select(joueur => new JoueurClassement(joueur, MauiProgram.Manager));
|
|
}
|
|
} |