首先:switch(a>0) a>0 所以为1
执行case 1:switch(
/*function prototype (declaration).*// *函数原型(声明).* /
/*create a global variable named stepFlg use to note the step.*/
/ *创建一个叫stepFlg的全局变量记录步骤.* /
/*out of size.*/ /* 过大 */
/*the pionted location is not empty. 指定的位置不为空 */
/*okay, put down the chessman. OK,落子*/
/*user input.用户输入 */
/*the risk level status of the chessboard.棋盘的风险等级*/
/*the attack level status of the chessboard. 棋盘的进攻力度等级*/
/*obviate the special satus of the first chessman 忽略先手的特殊位置*/
/*now, flag the first chessman had down. 现在标记第一个棋子 */
/*note the number of the step. 记录步数*/
/*evaluate the risk level and attack level of every row, column and slash. 评估每行每列以及斜线方向的风险和攻击等级 */
/*attck! 进攻!*/
/*attck a row. 横向进攻*/
/*attck a column. 纵向进攻*/
/*attack slash(\). 斜线进攻(\)*/
/*attack slash(/).斜线进攻(/)*/
/*locate the risk grid and put down one chessman to resolve it.定位有风险的格子并落子解除风险*/
/*resolve the risk of a Row. 解除横向风险*/
/*resolve the risk of a column.解除纵向风险*/
/*resolve the risk of a slash(\). 解除斜线风险(\)*/
/*resolve the risk of a slash(/). 解除斜线风险(/)*/
/*if there is no risk exist, put down the chessman in a blank(is not the best blank, may be).如果没有风险存在,在空位上落子(可能不是最好的空位) */
/*display the current chessman board. 显示当前局面*/
/*print the head. 打印head*/
/*print the contect.打印contect*/
/*print the floor. 打印floor*/
/*check whether win this game. 检测是否应得本盘棋局*/
后面打印部分的注释,怎么翻译要具体看程序是怎么定义的head,contect和floor啊~
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)