using System.Collections.ObjectModel;
using QwirkleClassLibrary.Boards;
using QwirkleClassLibrary.Players;
using QwirkleClassLibrary.Tiles;

namespace QwirkleClassLibrary.Games;

public interface IPlayer
{
    public Player CreatePlayer(string playerTag);

    public string SetNextPlayer();

    public string SetFirstPlayer(ReadOnlyCollection<Player> playingPlayers);

    public bool PlaceTile(Player player, Tile tile, int x, int y);

    public bool DrawTiles(Player player);

    public bool SwapTiles(Player player, List<Tile> tilesToSwap);

    public int GetPlayerScore(Player player, ReadOnlyCollection<Cell> cellsPlayed, Board b);

    int CalculateAdjacentScore(Cell cell, Board b, ReadOnlyCollection<Cell> cellsPlayed, Tuple<int, int> orientation,
        ref int nbCellsInLine, ref int nbCellsInPerpLine, ref List<Cell> checkedCells);

    int CalculateLineScore(ReadOnlyCollection<Cell> cellsPlayed, Cell cell, Tuple<int, int> direction,
        Tuple<int, int> orientation, ref int nbCellsInLine, ref int nbCellsInPerpLine, ref List<Cell> checkedCells);
}