public ChessPoint[] ChessDataPathToPoints(ChessDataPath path) { ChessPoint[] re = new ChessPoint[path.ChessPoints.Count]; for (int i = 0; i < path.ChessPoints.Count; i++) { re[i] = new ChessPoint(path.ChessPoints[i].X, path.ChessPoints[i].Y); } return(re); }
public ChessDataPath BuildChessDataPathFromPoints(ChessPoint[] points) { ChessDataPath re = new ChessDataPath(); for (int i = 0; i < points.Length; i++) { re.ChessPoints.Add(points[i].ParseToRpc()); } return(re); }
void OnShowHistoryPath(object content) { ChessDataPath path = (ChessDataPath)content; ShowChessMovePath(App.Package.ChessGame.ChessDataPathToPoints(path)); }
public HistoryStep BuildHistoryStep(int counter, ChessHeroData source, ChessPoint targetPoint, ChessDataPath path, int result) { ChessData s = new ChessData(); s.ChessRemoteId = source.remoteId; s.Belong = source.belong; s.ChessType = source.realChessType; s.Point = source.point.ParseToRpc(); ChessData t = new ChessData(); t.Point = targetPoint.ParseToRpc(); return(BuildHistoryStep(counter, s, t, path, result)); }
public HistoryStep BuildHistoryStep(int counter, ChessData source, ChessData target, ChessDataPath path, int result) { HistoryStep re = new HistoryStep(); re.Counter = counter; re.Source = source; re.Target = target; re.Path = path; re.Result = result; return(re); }