mirror of
https://github.com/bvanroll/cs-oo-project.git
synced 2025-08-29 20:12:40 +00:00
euh
This commit is contained in:
@@ -24,7 +24,7 @@ namespace Globals.classes
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
Bet b = (Bet)obj;
|
||||
return b.game == this.game && this.person == b.person && b.cash == this.cash && this.ploeg == b.ploeg;
|
||||
return this.Id == b.Id;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
@@ -51,7 +51,7 @@ namespace Globals.classes
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return person.ToString() + ":" + this.cash + "$ on " + this.game.ToString();
|
||||
return this.Id + ": " + person.ToString() + ":" + this.cash + "$ on " + this.game.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -71,8 +71,9 @@ namespace Globals.classes
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
Game g = (Game)obj;
|
||||
return this.home == g.away;
|
||||
|
||||
Game ga = (Game)obj;
|
||||
return this.Id == ga.Id;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
@@ -83,7 +84,7 @@ namespace Globals.classes
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return this.home.ToString() + " / " + this.away.ToString();
|
||||
return this.Id + ": " + this.home.ToString() + " / " + this.away.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@ namespace Globals.classes
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return this.name + " " + this.lastname;
|
||||
return this.Id + ": " +this.name + " " + this.lastname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -16,6 +16,12 @@ namespace Globals.classes
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
public Ploeg(string naam, int score, int Id)
|
||||
{
|
||||
this.score = score;
|
||||
this.naam = naam;
|
||||
this.Id = Id;
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
public string naam { get; set; }
|
||||
@@ -24,6 +30,14 @@ namespace Globals.classes
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
Ploeg te = (Ploeg)obj;
|
||||
|
||||
} catch (Exception e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Ploeg t = (Ploeg)obj;
|
||||
return this.Id == t.Id;
|
||||
}
|
||||
@@ -40,7 +54,7 @@ namespace Globals.classes
|
||||
{
|
||||
score = ":" + this.score;
|
||||
}
|
||||
return this.naam + score;
|
||||
return this.Id + ": " + this.naam + score;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -21,5 +21,9 @@ namespace Globals.Interfaces
|
||||
void save();
|
||||
void updateGame(Game g);
|
||||
void updatePerson(Person p);
|
||||
Person getPersonByString(string s);
|
||||
Ploeg getPloegByString(string s);
|
||||
Game getGameByString(string s);
|
||||
Bet getBetByString(string s);
|
||||
}
|
||||
}
|
||||
|
@@ -6,4 +6,5 @@ namespace Globals
|
||||
{
|
||||
public enum state { draw, home, away };
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user