目录
1.引言.................................................................................................................................................1
2. 概述...............................................................................................................................................1
2.1 背景介绍..............................................................................................................................1
2.1.1Karel 介绍..................................................................................................................1
2.1.2Karel 语言..................................................................................................................2
2.1.3Karel 与面向对象模式..............................................................................................3
2.2 课程设计题目......................................................................................................................4
2.3 课程设计目的......................................................................................................................4
2.4 开发环境..............................................................................................................................4
2.5 设计目标..............................................................................................................................5
2.5.1 地图寻宝...................................................................................................................5
2.5.2 排序...........................................................................................................................5
3.概要设计.........................................................................................................................................6
3.1 相关知识..............................................................................................................................6
3.1.1 Karel 基础指令.........................................................................................................6
3.1.2 Karel 可判断的环境条件.........................................................................................6
3.2 地图寻宝设计......................................................................................................................7
3.2.1Karel 寻宝算法..........................................................................................................7
3.2.2 地图寻宝主程序流程图...........................................................................................7
3.3 排序设计..............................................................................................................................8
4. 详细设计.......................................................................................................................................8
4.1 地图寻宝设计藏宝图..........................................................................................................8
4.2 地图寻宝算法......................................................................................................................8
4.2.1 地图寻宝流程图.......................................................................................................8
4.2.2 地图寻宝算法实现...................................................................................................9
4.3 排序算法............................................................................................................................10
4.3.1 捡起塔.....................................................................................................................10
4.3.2 按序重新绘塔.........................................................................................................11
4.3.3 显示完毕的标志.....................................................................................................12
5. 运行结果.....................................................................................................................................13
5.1 地图寻宝运行结果............................................................................................................13
5.2 排序运行结果....................................................................................................................16
6. 小结与体会.................................................................................................................................20
7.参考文献.......................................................................................................................................21
8.源代码...........................................................................................................................................21
8.1 地图寻宝............................................................................................................................21
8.2 排序....................................................................................................................................22