// See https://aka.ms/new-console-template for more information



using Models;
using Models.Game;

Position pos01 = new Position(0,0);
Position pos02 = new Position(1,0);
Position pos03 = new Position(2,0);
Position pos04 = new Position(3,0);
Position pos05 = new Position(4,0);

Position pos11 = new Position(0, 1);
Position pos12 = new Position(1, 1);
Position pos13 = new Position(2, 1);
Position pos14 = new Position(3, 1);
Position pos15 = new Position(4, 1);

Position pos21 = new Position(0, 2);
Position pos22 = new Position(1, 2);
Position pos23 = new Position(2, 2);
Position pos24 = new Position(3, 2);
Position pos25 = new Position(4, 2);

Position pos31 = new Position(0, 3);
Position pos32 = new Position(1, 3);
Position pos33 = new Position(2, 3);
Position pos34 = new Position(3,3);
Position pos35 = new Position(4, 3);

List<Position> list = new List<Position>();
list.Add(pos01);
list.Add(pos02);
list.Add(pos03);
list.Add(pos04);
list.Add(pos05);

list.Add(pos11);
list.Add(pos12);
list.Add(pos13);
list.Add(pos14);
list.Add(pos15);

list.Add(pos21);
list.Add(pos22);
list.Add(pos23);
list.Add(pos24);
list.Add(pos25);

list.Add(pos31);
list.Add(pos32);
list.Add(pos33);
list.Add(pos34);
list.Add(pos35);



/*Pion pion1 = new Pion(une, 5);
Pion pion2 = new Pion(deux, 8);

Console.WriteLine(pion1);
Console.WriteLine(pion2);

List<Pion> pions = new List<Pion>() { pion1, pion2 };

int i = 0;

foreach (var item in list)
{
   
    Console.Write(" | ");
    foreach (var pion in pions)
    {
        if (item.X == pion.Position.X && item.Y == pion.Position.Y)
        {
            Console.Write(pion);
        }
    }
    i++;
    if (i%2 == 0) Console.Write(" |\n");
}*/



/*Pion pion1 = new Pion(pos35);
pion1.Select = true;

Pion pion2 = new Pion(pos11);
pion2.Select = true;

Console.WriteLine(pion1);

List<Pion> list2 = new List<Pion>() { pion1,pion2 };


int i = 0;

foreach (var item in list)
{
    Console.Write(" | ");
    foreach (var pion in list2)
    {
        if (pion.Select == true && pion.Position.X == item.X && pion.Position.Y == item.Y) Console.Write("X");
    }
    i++;
    if (i % 4 == 0) Console.Write(" |\n");
}*/


OperationsGrid grille = new OperationsGrid();


grille.ResultGrid(Operation.ADDITION);
grille.ResultGrid(Operation.MULTIPLICATION);
grille.ResultGrid(Operation.LOWER);
grille.ResultGrid(Operation.MULTIPLICATION);
grille.ResultGrid(Operation.MULTIPLICATION);
grille.ResultGrid(Operation.HIGHER);

int cpt = 0;
foreach (var item in grille.Tiles)
{
    Console.Write(" | ");
    Console.Write(item);
    cpt++;
    if (cpt % 4 == 0) Console.Write(" |\n");
}



Player p = new Player();
Player p2 = new Player("Luka");
Player p3 = new Player("Corento", "N/A");

Console.WriteLine("Pseudo: " + p.Pseudo + "\nPhoto de Profil: " + p.ProfilePicture);
Console.WriteLine("========================================================");
Console.WriteLine("Pseudo: " + p2.Pseudo + "\nPhoto de Profil: " + p2.ProfilePicture);
Console.WriteLine("========================================================");
Console.WriteLine("Pseudo: " + p3.Pseudo + "\nPhoto de Profil: " + p3.ProfilePicture);