public SpookyMarkBot addSpookyMark() { MarkBot mark1 = currentSpookyMark[0]; MarkBot mark2 = currentSpookyMark[1]; currentSpookyMark = new List<MarkBot>(); SpookyMarkBot s = new SpookyMarkBot(mark1, mark2); mark1.sm = s; mark2.sm = s; spookyMarks.Add(s); if (entGraph.addEdgeSQ(squares[mark1.position], squares[mark2.position])) { toCollapse = s; return s; } HashSet<SquareBot> sqCycle = entGraph.getCycleSQ(squares[mark1.position]); if (sqCycle != null) { toCollapse = s; return s; } else { return null; } }
public void addMark(MarkBot mark) { gameManager.numMarks++; currentSpookyMark.Add(mark); if (gameManager.numMarks == 2) { gameManager.nextTurn(); } }
public SpookyMarkBot(SpookyMarkBot sm) { MarkBot mark1 = new MarkBot(sm.mark1); mark1.sm = this; MarkBot mark2 = new MarkBot(sm.mark2); mark2.sm = this; this.init(mark1, mark2); }
public SpookyMarkBot(MarkBot mark1, MarkBot mark2) { this.mark1 = mark1; this.mark2 = mark2; this.player = mark1.player; this.turn = mark1.turn; this.position1 = mark1.position; this.position2 = mark2.position; this.finalPosition = -1; this.finalized = false; }
public void addMark() { int numMarks = gameManager.getNumMarks(); if (numMarks == 2 || alreadyMarked || filledMarks == 8) { Debug.Log("1"); return; } int player = gameManager.getCurrentPlayer(); int turn = gameManager.getTurnNum(); MarkBot mark = new MarkBot(player, turn, position, null); presentMarks.Add(mark); alreadyMarked = true; gameManager.board.addMark(mark); filledMarks++; }
public void addPresentMark(MarkBot mark) { presentMarks.Add(mark); }
public MarkBot(MarkBot m) { this.init(m.player, m.turn, m.position, m.sm); }