mirror of
https://github.com/bvanroll/cs-oo-project.git
synced 2025-08-30 04:22:42 +00:00
Deep Shallow copy moe nog gebeuren
This commit is contained in:
@@ -5,37 +5,47 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Globals.Classes
|
||||
namespace Globals.classes
|
||||
{
|
||||
public class PloegInMatch : Ploeg
|
||||
{
|
||||
|
||||
|
||||
public int score;
|
||||
|
||||
public PloegInMatch(int score)
|
||||
public PloegInMatch(int id, string naam) : base(id, naam)
|
||||
{
|
||||
}
|
||||
|
||||
public PloegInMatch(int id, string naam, int score) : base(id, naam)
|
||||
{
|
||||
setScore(score);
|
||||
}
|
||||
|
||||
public PloegInMatch(Ploeg p) : base(p)
|
||||
{
|
||||
this.Id = p.Id;
|
||||
this.naam = p.naam;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public PloegInMatch(Ploeg p, int score) : base(p)
|
||||
{
|
||||
this.Id = p.Id;
|
||||
this.naam = p.naam;
|
||||
setScore(score);
|
||||
|
||||
}
|
||||
|
||||
public int score { get; private set; }
|
||||
public bool scoreSet { get; private set; }
|
||||
public event EventHandler scoreChanged;
|
||||
|
||||
public void setScore(int score)
|
||||
{
|
||||
EventHandler h = scoreChanged;
|
||||
if (null != h) h(this, EventArgs.Empty);
|
||||
this.score = score;
|
||||
this.scoreSet = true;
|
||||
}
|
||||
|
||||
public override zegMijnNaam(string naam)
|
||||
{
|
||||
return "blabla " + naam;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return base.Equals(obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return base.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user