Exemple #1
0
        //should only be used to start lines.
        internal Node(Domino v, string owner)
        {
            if (!v.IsDouble())
            {
                throw new ArgumentException("Must start game graph with double");
            }

            Value    = v;
            Children = new List <Node>();
            End      = Value.First;
            Owner    = owner;
        }
Exemple #2
0
        public void Start(Domino starter)
        {
            if (!starter.IsDouble())
            {
                throw new ArgumentException("Must start game graph with double");
            }

            if (_root != null)
            {
                throw new InvalidOperationException("Graph already started");
            }

            _root  = starter;
            _lines = Players.Select(p => new Node(starter, p.Name())).ToList();
        }