예제 #1
0
 // Start is called before the first frame update
 public void init(GraphBot entGraph, SquareBot[] squares, List<SpookyMarkBot> spookyMarks, 
     List<int> collapsed, SpookyMarkBot toCollapse, List<MarkBot> currentSpookyMark, int nextAction)
 {
     this.entGraph = entGraph;
     this.squares = squares;
     this.spookyMarks = spookyMarks;
     this.collapsed = collapsed;
     this.toCollapse = toCollapse;
     this.currentSpookyMark = currentSpookyMark;
     this.nextAction = nextAction;
 }
예제 #2
0
    public GraphBot(GraphBot g, GameManagerBot gameManager)
    {
        Dictionary <SquareBot, HashSet <SquareBot> > adjlistSQ = new Dictionary <SquareBot, HashSet <SquareBot> >();
        Dictionary <SquareBot, HashSet <SquareBot> > gList     = g.adjlistSQ;

        foreach (KeyValuePair <SquareBot, HashSet <SquareBot> > kvp in gList)
        {
            SquareBot           sb = new SquareBot(gameManager, kvp.Key);
            HashSet <SquareBot> h  = new HashSet <SquareBot>();
            foreach (SquareBot sq in kvp.Value)
            {
                h.Add(new SquareBot(gameManager, sq));
            }
            adjlistSQ.Add(sb, h);
        }
        this.init(adjlistSQ);
    }