Block matching basics complete

This commit is contained in:
Ben Wallis
2015-12-20 15:17:26 +00:00
parent 014107c76b
commit 89e98fc8c6
10 changed files with 482 additions and 40 deletions

View File

@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
namespace Filtration.ObjectModel
{
public class SocketGroup : List<Socket>
{
public SocketGroup(List<Socket> sockets, bool linked)
{
if (sockets.Count < 1 || sockets.Count > 6)
{
throw new InvalidOperationException("A socket group must have between 2 and 6 sockets");
}
if (linked && sockets.Count < 2)
{
throw new InvalidOperationException("A linked socket group must have at least 2 sockets");
}
AddRange(sockets);
Linked = linked;
}
public bool Linked { get; }
}
}