public void MakeSelectField(pos selectField, Player playeronTurn, Manager manager) //vybrání pole { int nowX = selectField.x - 1; int nowY = selectField.y - 1; int beforeX; int beforeY; if (ContainStonePlayer(fields[nowX, nowY], playeronTurn)) { beforeX = selectField.x - 1; beforeY = selectField.y - 1; Stone stone = new Stone(); stone.properties = fields[nowX, nowY]; stone.position = selectField; if ((fields[beforeX, beforeY] & Field.choice) == Field.choice) { fields[beforeX, beforeY] &= ~Field.choice; } fields[nowX, nowY] = fields[nowX, nowY] | Field.choice; SetSelectField(nowX + 1, nowY + 1); control.UnmarkPossibleFields(this); List <pos> possiblePosition = new List <pos>(); possiblePosition = control.PossiblePosition(stone, stone.position, this); control.MarkPossibleField(this, possiblePosition); } }
public void MoveChoisenStone(pos selectField, Stone selectStone) //posun kamene po kliku { Board.MoveStone(selectStone, selectField, this); //přesun kamene Controlor.UnmarkPossibleFields(Board); //odznačení předchozích možných pozic }