diff --git a/Qwirkle/QwirkleClassLibrary/Tiles/TileBag.cs b/Qwirkle/QwirkleClassLibrary/Tiles/TileBag.cs index 9088b05..8f096dc 100644 --- a/Qwirkle/QwirkleClassLibrary/Tiles/TileBag.cs +++ b/Qwirkle/QwirkleClassLibrary/Tiles/TileBag.cs @@ -41,7 +41,7 @@ namespace QwirkleClassLibrary.Tiles } }*/ - Tile t1 = new Tile(Shape.Club, Color.Red); + Tile t1 = new Tile(Shape.Club, Color.Yellow); Tile t2 = new Tile(Shape.Round, Color.Orange); tiles.Add(t1); diff --git a/Qwirkle/QwirkleViews/ConverterColor.cs b/Qwirkle/QwirkleViews/ConverterColor.cs index ff8ebe7..228f056 100644 --- a/Qwirkle/QwirkleViews/ConverterColor.cs +++ b/Qwirkle/QwirkleViews/ConverterColor.cs @@ -17,7 +17,7 @@ namespace Qwirkle.Converters if (colorstring == "Red") return Colors.Red; if (colorstring == "Blue") return Colors.Blue; if (colorstring == "Green") return Colors.Green; - if (colorstring == "Orange") return Colors.OrangeRed; + if (colorstring == "Orange") return Colors.Orange; if (colorstring == "Purple") return Colors.Purple; if (colorstring == "Transparent") return Colors.Transparent; diff --git a/Qwirkle/QwirkleViews/Pages/Gameboard.xaml b/Qwirkle/QwirkleViews/Pages/Gameboard.xaml index 2eaf015..68ebe8e 100644 --- a/Qwirkle/QwirkleViews/Pages/Gameboard.xaml +++ b/Qwirkle/QwirkleViews/Pages/Gameboard.xaml @@ -28,7 +28,7 @@ - + Title="Leaderboard" + x:Name="root"> + @@ -24,60 +25,47 @@ - + RowDefinitions="50"> - - - - - - - - - + + + + + + + + + - - - - - \ No newline at end of file + diff --git a/Qwirkle/QwirkleViews/Pages/Leaderboard.xaml.cs b/Qwirkle/QwirkleViews/Pages/Leaderboard.xaml.cs index 0b6047d..85be440 100644 --- a/Qwirkle/QwirkleViews/Pages/Leaderboard.xaml.cs +++ b/Qwirkle/QwirkleViews/Pages/Leaderboard.xaml.cs @@ -6,6 +6,5 @@ public partial class Leaderboard : ContentPage { InitializeComponent(); BindingContext = ((App)Application.Current!).LD; - } } \ No newline at end of file diff --git a/Qwirkle/QwirkleViews/Views/LeaderboardLine.xaml b/Qwirkle/QwirkleViews/Views/LeaderboardLine.xaml index 3a77ddd..135f32b 100644 --- a/Qwirkle/QwirkleViews/Views/LeaderboardLine.xaml +++ b/Qwirkle/QwirkleViews/Views/LeaderboardLine.xaml @@ -1,42 +1,42 @@  - + x:Class="Qwirkle.Views.LeaderboardLine" + x:Name="root"> + - + - \ No newline at end of file + diff --git a/Qwirkle/QwirkleViews/Views/LeaderboardLine.xaml.cs b/Qwirkle/QwirkleViews/Views/LeaderboardLine.xaml.cs index fc6a05a..2e44147 100644 --- a/Qwirkle/QwirkleViews/Views/LeaderboardLine.xaml.cs +++ b/Qwirkle/QwirkleViews/Views/LeaderboardLine.xaml.cs @@ -3,23 +3,51 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Microsoft.Maui.Controls; -namespace Qwirkle.Views; - -public partial class LeaderboardLine : ContentView +namespace Qwirkle.Views { - public LeaderboardLine() + public partial class LeaderboardLine : ContentView { - InitializeComponent(); - BindingContext = this; - } + public LeaderboardLine() + { + InitializeComponent(); + } - public static readonly BindableProperty NameProperty = - BindableProperty.Create(nameof(Name), typeof(string), typeof(LeaderboardLine), ""); + public static readonly BindableProperty PlayerNameProperty = + BindableProperty.Create(nameof(PlayerName), typeof(string), typeof(LeaderboardLine), ""); - public string Name - { - get => (string)GetValue(NameProperty); - set => SetValue(NameProperty, value); + public static readonly BindableProperty DateProperty = + BindableProperty.Create(nameof(Date), typeof(DateTime), typeof(LeaderboardLine), default(DateTime)); + + public static readonly BindableProperty PointsProperty = + BindableProperty.Create(nameof(Points), typeof(int), typeof(LeaderboardLine), 0); + + public static readonly BindableProperty VictoriesProperty = + BindableProperty.Create(nameof(Victories), typeof(int), typeof(LeaderboardLine), 0); + + public string PlayerName + { + get => (string)GetValue(PlayerNameProperty); + set => SetValue(PlayerNameProperty, value); + } + + public DateTime Date + { + get => (DateTime)GetValue(DateProperty); + set => SetValue(DateProperty, value); + } + + public int Points + { + get => (int)GetValue(PointsProperty); + set => SetValue(PointsProperty, value); + } + + public int Victories + { + get => (int)GetValue(VictoriesProperty); + set => SetValue(VictoriesProperty, value); + } } -} \ No newline at end of file +}