public GoGroupClass(GoGroupListClass group_list_object_val) { this.theGroupListObject = group_list_object_val; this.indexNumber = this.theGroupListObject.GroupCount(); this.myColor = this.theGroupListObject.MyColor(); this.stoneCount = 0; this.existMatrix = new bool[GoDefineClass.MAX_BOARD_SIZE, GoDefineClass.MAX_BOARD_SIZE]; this.deadMatrix = new bool[GoDefineClass.MAX_BOARD_SIZE, GoDefineClass.MAX_BOARD_SIZE]; this.hisColor = (this.myColor == GoDefineClass.GO_EMPTY_STONE) ? GoDefineClass.GO_EMPTY_STONE : GoDefineClass.GetOppositeColor(this.myColor); }
private void processTheWholeMoveList() { this.BoardObject().ResetBoardObjectData(); this.FightObject().ResetEngineObjectData(); this.resetGameObjectPartialData(); int i = 0; while (i < this.theTotalMoves) { GoMoveClass move = this.theMovesArray[i]; this.FightObject().EnterBattle(move); this.theNextColor = GoDefineClass.GetOppositeColor(move.MyColor()); i += 1; } }
public void AddNewMoveAndFight(GoMoveClass move_val) { this.debugIt(true, "AddNewMoveAndFight", "Move = " + move_val.MoveInfo()); if (move_val.TurnIndex() != this.theTotalMoves + 1) { this.logitIt("AddNewMoveAndFight", "duplicated move received *****************"); return; } if (this.theGameIsOver) { this.abendIt("AddNewMoveAndFight", "theGameIsOver"); return; } this.thePassReceived = false; this.BoardObject().ClearLastDeadStone(); this.insertMoveToMoveList(move_val); this.FightObject().EnterBattle(move_val); this.theNextColor = GoDefineClass.GetOppositeColor(move_val.MyColor()); }