/// <summary> /// Instantiates a new group from a single stone. /// </summary> /// <param name="stone">The stone from which the group is instantiated.</param> public Group(Stone stone) { _stones = new HashSet <Stone>(); _stones.Add(stone); _player = stone.Player; }
/// <summary> /// Returns true if the group contains the stone. /// </summary> /// <param name="stone"></param> /// <returns></returns> public bool Contains(Stone stone) { return(_stones.Contains(stone)); }