OOPgyakorlok/KartyaOszto/Jatekos.cs

31 lines
668 B
C#
Raw Normal View History

2023-02-14 18:09:02 +00:00
using System;
using System.Collections.Generic;
using System.Text;
namespace KartyaOszto
{
class Jatekos
{
public string nev;
public Kartyalap[] lapok;
private int felvett;
public Jatekos(string nev, int lapszam)
{
lapok = new Kartyalap[lapszam];
this.nev = nev;
felvett = 0;
}
public void Felvesz(List<Kartyalap> laplista)
{
foreach (Kartyalap kl in laplista)
{
lapok[felvett] = kl;
felvett++;
2023-02-22 18:14:07 +00:00
Console.WriteLine($"{nev} felvette: "+ kl.ToString());
2023-02-14 18:09:02 +00:00
}
}
}
}