資源簡介
(1)對局雙方各執(zhí)一色棋子。
(2)空棋盤開局。
(3)黑先、白后,交替下子,每次只能下一子。
(4)棋子下在棋盤的空白點上,棋子下定后,不得向其它點移動,不得從棋盤上拿掉或拿起另落別處。
(5)黑方的第一枚棋子可下在棋盤任意交叉點上。
(6)輪流下子是雙方的權(quán)利,但允許任何一方放棄下子權(quán)
代碼片段和文件信息
package?com.test.awt;
import?java.awt.Dimension;
import?java.awt.frame;
import?java.awt.Graphics;
import?java.awt.Point;
import?java.awt.event.MouseAdapter;
import?java.awt.event.MouseEvent;
import?java.awt.event.WindowAdapter;
import?java.awt.event.WindowEvent;
import?java.util.ArrayList;
import?java.util.Iterator;
import?java.util.List;
public?class?LineDrawer?extends?frame?{
/**
?*?
?*/
private?static?final?long?serialVersionUID?=?5212498509267166927L;
//?所有的線條
private?List>?lines?=?new?ArrayList>();
//?當(dāng)前線條(點的集合)
private?List?currLine;
public?LineDrawer(String?title)?{
super(title);
//?注冊鼠標(biāo)監(jiān)聽器
addMouseListener(new?MouseAdapter()?{
//?抬起、按下鼠標(biāo)時處理程序
@Override
public?void?mousePressed(MouseEvent
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-09-27?23:50??JavaWork(五子棋)\
?????文件?????????301??2017-09-12?19:38??JavaWork(五子棋)\.classpath
?????文件?????????384??2017-09-12?19:38??JavaWork(五子棋)\.project
?????目錄???????????0??2017-09-27?23:49??JavaWork(五子棋)\.settings\
?????文件?????????598??2017-09-12?19:38??JavaWork(五子棋)\.settings\org.eclipse.jdt.core.prefs
?????目錄???????????0??2017-09-27?23:49??JavaWork(五子棋)\bin\
?????目錄???????????0??2017-09-27?23:49??JavaWork(五子棋)\bin\mywork\
?????目錄???????????0??2017-09-27?23:49??JavaWork(五子棋)\bin\mywork\wuziqi\
?????文件????????1593??2017-09-24?21:55??JavaWork(五子棋)\bin\mywork\wuziqi\WuZiQi$1.class
?????文件????????1029??2017-09-24?21:55??JavaWork(五子棋)\bin\mywork\wuziqi\WuZiQi$2.class
?????文件????????2112??2017-09-24?21:55??JavaWork(五子棋)\bin\mywork\wuziqi\WuZiQi$ChessBoard.class
?????文件????????4563??2017-09-24?21:55??JavaWork(五子棋)\bin\mywork\wuziqi\WuZiQi.class
?????目錄???????????0??2017-09-27?23:50??JavaWork(五子棋)\GUItest\
?????文件?????????301??2017-08-31?15:28??JavaWork(五子棋)\GUItest\.classpath
?????文件?????????383??2017-08-31?15:28??JavaWork(五子棋)\GUItest\.project
?????目錄???????????0??2017-09-27?23:49??JavaWork(五子棋)\GUItest\.settings\
?????文件?????????598??2017-08-31?15:28??JavaWork(五子棋)\GUItest\.settings\org.eclipse.jdt.core.prefs
?????目錄???????????0??2017-09-27?23:50??JavaWork(五子棋)\GUItest\bin\
?????目錄???????????0??2017-09-27?23:49??JavaWork(五子棋)\GUItest\bin\com\
?????目錄???????????0??2017-09-27?23:49??JavaWork(五子棋)\GUItest\bin\com\test\
?????目錄???????????0??2017-09-27?23:49??JavaWork(五子棋)\GUItest\bin\com\test\awt\
?????文件????????1089??2017-09-27?19:26??JavaWork(五子棋)\GUItest\bin\com\test\awt\LineDrawer$1.class
?????文件?????????959??2017-09-27?19:26??JavaWork(五子棋)\GUItest\bin\com\test\awt\LineDrawer$2.class
?????文件?????????718??2017-09-27?19:26??JavaWork(五子棋)\GUItest\bin\com\test\awt\LineDrawer$3.class
?????文件????????2702??2017-09-27?19:26??JavaWork(五子棋)\GUItest\bin\com\test\awt\LineDrawer.class
?????目錄???????????0??2017-09-27?23:49??JavaWork(五子棋)\GUItest\bin\com\test\swing\
?????文件?????????799??2017-09-27?19:26??JavaWork(五子棋)\GUItest\bin\com\test\swing\ChessPanle$1.class
?????文件?????????723??2017-09-27?19:26??JavaWork(五子棋)\GUItest\bin\com\test\swing\ChessPanle$2.class
?????文件????????1263??2017-09-27?19:26??JavaWork(五子棋)\GUItest\bin\com\test\swing\ChessPanle$3.class
?????文件????????3790??2017-09-27?19:26??JavaWork(五子棋)\GUItest\bin\com\test\swing\ChessPanle.class
?????文件????????1385??2017-09-27?19:26??JavaWork(五子棋)\GUItest\bin\com\test\swing\ChessPla
............此處省略58個文件信息
評論
共有 條評論