diff options
| author | Ramaekers,Aldrik A.N <a.ramaekers@student.fontys.nl> | 2020-09-16 09:42:04 +0200 |
|---|---|---|
| committer | Ramaekers,Aldrik A.N <a.ramaekers@student.fontys.nl> | 2020-09-16 09:42:04 +0200 |
| commit | f6f3bbbc5b7741ad0db3c88a398cfc3943988529 (patch) | |
| tree | f9f3aca3cc688369607060336b699b8f711eb360 /Events/RoundFinishedEvent.cs | |
| parent | 5a045404f3c49022abeb75c27dfe6f82d35928f7 (diff) | |
Diffstat (limited to 'Events/RoundFinishedEvent.cs')
| -rw-r--r-- | Events/RoundFinishedEvent.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Events/RoundFinishedEvent.cs b/Events/RoundFinishedEvent.cs new file mode 100644 index 0000000..061b31d --- /dev/null +++ b/Events/RoundFinishedEvent.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Chess.Events +{ + public class RoundFinishedEvent : EventArgs + { + public int Round { get; } + public PlayerMove Move1 { get; private set; } + public PlayerMove Move2 { get; private set; } + + public bool IsDone { get { return Move1 != null && Move2 != null; } } + + public RoundFinishedEvent(int round) + { + Round = round; + } + + public void AddMove(PlayerMove move) + { + if (Move1 == null) Move1 = move; + else Move2 = move; + } + } +} |
