// movableLoacation 動かすことのできる地点の計算 internal void setClicedKoma(int left, int height) { movableLoacation = new List <Tuple <int, int> >(); clickedKoma = this.GetKoma(left, height); if (clickedKoma != null) { foreach (var locateInfo in this.GetCanMove(clickedKoma.GetMovableLoacation(), clickedKoma)) { // getcanmove から locateinfo を作り、movableLoacationに追加 movableLoacation.Add(locateInfo); } } }
private List <Tuple <int, int> > GetCanMove(IEnumerable <Tuple <MoveType, int, int> > locateInfos, KomaBase koma) { var inBoardLocates = this.GetInBoardLocate(locateInfos); var canMoveLocates = new List <Tuple <int, int> >(); canMoveLocates.AddRange(this.GetNormal(inBoardLocates)); return(canMoveLocates); }
internal void ClearClickedKoma() { clickedKoma = null; movableLoacation.Clear(); }