summaryrefslogtreecommitdiff
path: root/Events/RoundFinishedEvent.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Events/RoundFinishedEvent.cs')
-rw-r--r--Events/RoundFinishedEvent.cs28
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;
+ }
+ }
+}