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.
sae201_qwirkle/Qwirkle/QwirkleViews/App.xaml.cs

35 lines
1.1 KiB

using Qwirkle.Views;
using Microsoft.Maui.Controls;
using Qwirkle.Pages;
using QwirkleClassLibrary.Games;
using QwirkleClassLibrary.Persistences;
using QwirkleClassLibrary.Players;
using Leaderboard = QwirkleClassLibrary.Players.Leaderboard;
namespace Qwirkle
{
public partial class App
{
public App()
{
Directory.SetCurrentDirectory(Path.Combine(Directory.GetCurrentDirectory(), "..\\..\\..\\Files"));
InitializeComponent();
MainPage = new AppShell();
Routing.RegisterRoute(nameof(SetPlayers), typeof(SetPlayers));
Routing.RegisterRoute(nameof(Gameboard), typeof(Gameboard));
Routing.RegisterRoute(nameof(Rules), typeof(Rules));
Routing.RegisterRoute(nameof(MainPage), typeof(MainPage));
Routing.RegisterRoute(nameof(Qwirkle.Pages.Leaderboard), typeof(Qwirkle.Pages.Leaderboard));
ILeaderboardPersistence leaderboardLoad = new LeaderboardPersistenceJson();
Ld = leaderboardLoad.LoadLeaderboard();
}
public Game Game { get; set; } = new();
public Leaderboard Ld { get; set; }
}
}