﻿using AsmodeeDigital.PlayReal.Plugin.Domain.GameConfiguration;
using AsmodeeDigital.PlayReal.Plugin.Domain.GameState;
using AsmodeeDigital.PlayReal.Plugin.Domain.Players;
using com.daysofwonder;
using com.daysofwonder.async;
using System;
using System.Collections.Generic;

namespace AsmodeeDigital.PlayReal.Plugin.Manager.Persistence
{
    /// <summary>
    /// Persistent data
    /// </summary>
    [Serializable]
    public class Persistence
    {
        /// <summary>
        /// Connected player. Null if user is not connected to DoW server
        /// </summary>
        public Player ConnectedPlayer = null;

        /// <summary>
        /// Current session ID of the player. Initialized when the player is connected to DoW server
        /// </summary>
        public Session Session;

        /// <summary>
        /// Current game details of the game played by the player.
        /// </summary>
        public IGameDetails CurrentGameDetails = null;

        //--- Game creation
        /// <summary>
        /// Type of game to create (Local or distant)
        /// </summary>
        public GameType GameType;

        /// <summary>
        /// List of all players for creating a game
        /// </summary>
        public List<IPlayerSeat> PlayerSeats;

        /// <summary>
        /// List of players who have accepted the invitation (DoW Ids)
        /// </summary>
        public List<int> InvitationAcceptedByPlayers;
        //---

        //--- Replay
        /// <summary>
        /// GameState for replay
        /// </summary>
        public GameStateBase GameState;
        //---
    }
}
