// 重现玩家绘制过关路线 private void init(RankList.Record R) { string[] walls = R.getWalls().Split(','); string[] paths = R.getPaths().Split(','); string[] route = R.getRoute().Split(','); string[] start = { "1", "1" }; int Columns = Convert.ToInt32(walls[walls.Length - 3]) + 1; int Rows = Convert.ToInt32(walls[walls.Length - 2]) + 1; string[] end = { (Columns - 2).ToString(), (Rows - 2).ToString() }; // 画出网格 drawGrid(Columns, Rows); // 画墙 Draw(walls, Brushes.Red); // 画通路 Draw(paths, Brushes.Yellow); // 画过关路线 Draw(route, Brushes.Pink); // 画起点 Draw(start, Brushes.Blue); // 画终点 Draw(end, Brushes.Black); }
public Route(RankList.Record R) { InitializeComponent(); init(R); }