谁有java井字棋小游戏的代码啊??人与电脑下,用O和X符号
按要求井字棋要有两个classes
第一是 Board 要有这些功能
reset: 还原到开始全空的格子.
status: to find the current status of a specified square of the board.
Try: to temporarily insert a symbol in a square. The method will return the
number of straight lines passing through the square that have 3 identical
symbols on the line – this value can be 0, 1, or 2. Method clear undoes the
effect of a try.
Place: places the specified symbol in an unoccupied square. The method
returns value Continue, Drawn or Win depending on the state of the board
after new symbol has been placed on the board. (In the following description I
use the words try and place with the meanings described in these dot points)
Trying to place a symbol in an occupied square by method try or place
should raise an exception.
第二个是 Class Strategy
方法move要有以下功能
1,如果中间的格子是空的,电脑就要在那格标记.
2,反复插入电脑和符号到空的格子,寻找可以一个就赢,电脑就下这一格.
小弟是新手..有人可以帮我写这两个class么?
求java井字棋