namespace Tests;
using Models.Game;
using System.Reflection;
using static System.Type;
public class GameTests
{
    [Fact]
    public void Game_Initialization_SetsPlayer()
    {
        Player player = new Player("test_player");
        Map map = new Map("test_background");

        var game = new Game(player, map);

        Assert.Equal(player, game.CurrentPlayer);
    }

    [Fact]
    public void Initialize_Turn_1()
    {
        Player player = new Player("test_player");
        Map map = new Map("test_background");

        Game test = new Game(player, map);

        typeof(Game).GetProperty("Turn").SetValue(test, 1);


        var result = test.GetResult();

        Assert.Equal(typeof(Game).GetProperty("Turn").GetValue(test.Turn), 1);
    }
    /*
    [Fact]
    public void Game_Initialization_SetsMap()
    {
        Player player = new Player("test_player");
        Map map = new Map("test_background");

        var game = new Game(player, map);

        Assert.Equal(map, game.UsedMap);
    }

    [Fact]
    public void Game_Initialization_SetsDice()
    {
        Player player = new Player("test_player");
        Map map = new Map("test_background");

        var game = new Game(player, map);

        Assert.NotNull(game.Dice1);
        Assert.NotNull(game.Dice2);
    }

    [Fact]
    public void Game_Initialization_SetsGameRules()
    {
        Player player = new Player("test_player");
        Map map = new Map("test_background");

        var game = new Game(player, map);

        Assert.NotNull(game.GameRules);
    }

    [Fact]
    public void RollAllDice_RollsAllDice()
    {
        Player player = new Player("test_player");
        Map map = new Map("test_background");

        var game = new Game(player, map);

        game.RollAllDice();

        Assert.True(game.Dice1.Value >= 0 && game.Dice1.Value <= 5);
        Assert.True(game.Dice2.Value >= 1 && game.Dice2.Value <= 6);
    }

    [Fact]
    public void MarkOperationAsChecked_Check_Well()
    {
        Player player = new Player("test_player");
        Map map = new Map("test_background");

        var game = new Game(player, map);

        game.MarkOperationAsChecked(Operation.LOWER);

        Assert.True(game.UsedMap.OperationGrid[0].IsChecked);
    }

    */
}
