文件名称:gaiyaoshejishuoming
介绍说明--下载内容均来自于网络,请自行研究使用
五子棋概要设计说明书
从程序表面看,这是一个二维平面图,所以数据用二维数组来表示,数组两个下标可以表示棋盘上的位置,数组元素的值代表棋格上的状态,共有三种情况,分别是0代表空格,1代表白棋,2代表黑棋。这样程序的主要工作是接收棋手按键操作,棋手1用Up、Down、Left、Right控制光标移动,回车键表示落子。棋手2用W、S、A、D控制光标移动,空格键表示落子。一旦接收到回车键或空格键,说明棋手落子,先判断是否是有效位置,也就是说已经有棋子的位置不能重叠落子。落子成功后,马上判断以该位置为中心的八个方向:上、下、左、右、左上、左下、右上、右下是否有相同颜色的棋子连成五子,如果连成五子,则游戏结束,输出相应的信息。如果想退出游戏,可以按Esc键-Surface from the program, which is a two-dimensional floor plan, so the data represented by two-dimensional array, the array can be expressed both subscr ipt position on the board, the value of array elements on the grid on behalf of the state of chess, a total of three cases, respectively, is 0 for a space, 1 White, 2 for black. The main work of this program is to receive player button operation, player 1 with Up, Down, Left, Right control cursor movement, the Enter key that Laozi. 2 players with the W, S, A, D control cursor movement, the space bar that Laozi. Upon receiving the enter key or space bar, that player Lazi, first determine whether the location is valid, that has been the location of pieces can not overlap Lazi. After the success of Lazi, immediately determine the location of the center of the eight directions: up, down, left, right, left, lower left, upper right, lower right have the same color of the pieces together into five sub, if even as five children, the game is ov
从程序表面看,这是一个二维平面图,所以数据用二维数组来表示,数组两个下标可以表示棋盘上的位置,数组元素的值代表棋格上的状态,共有三种情况,分别是0代表空格,1代表白棋,2代表黑棋。这样程序的主要工作是接收棋手按键操作,棋手1用Up、Down、Left、Right控制光标移动,回车键表示落子。棋手2用W、S、A、D控制光标移动,空格键表示落子。一旦接收到回车键或空格键,说明棋手落子,先判断是否是有效位置,也就是说已经有棋子的位置不能重叠落子。落子成功后,马上判断以该位置为中心的八个方向:上、下、左、右、左上、左下、右上、右下是否有相同颜色的棋子连成五子,如果连成五子,则游戏结束,输出相应的信息。如果想退出游戏,可以按Esc键-Surface from the program, which is a two-dimensional floor plan, so the data represented by two-dimensional array, the array can be expressed both subscr ipt position on the board, the value of array elements on the grid on behalf of the state of chess, a total of three cases, respectively, is 0 for a space, 1 White, 2 for black. The main work of this program is to receive player button operation, player 1 with Up, Down, Left, Right control cursor movement, the Enter key that Laozi. 2 players with the W, S, A, D control cursor movement, the space bar that Laozi. Upon receiving the enter key or space bar, that player Lazi, first determine whether the location is valid, that has been the location of pieces can not overlap Lazi. After the success of Lazi, immediately determine the location of the center of the eight directions: up, down, left, right, left, lower left, upper right, lower right have the same color of the pieces together into five sub, if even as five children, the game is ov
(系统自动生成,下载前可以参看下载内容)
下载文件列表
概要设计说明401-五子棋第一组.doc