From 816dece296f75387ed980cda47b0fd6f8aa24f29 Mon Sep 17 00:00:00 2001 From: p2cyq7sv3 <3554147126@qq.com> Date: Sat, 13 Apr 2024 22:09:54 +0800 Subject: [PATCH] ADD file via upload --- src/Chess.java | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/Chess.java diff --git a/src/Chess.java b/src/Chess.java new file mode 100644 index 0000000..4e4e594 --- /dev/null +++ b/src/Chess.java @@ -0,0 +1,25 @@ +package 五子棋; + +import java.awt.Color; +public class Chess { + + private int x;//棋子的x坐标索引 + private int y;//棋子的y坐标索引 + private Color color;//棋子颜色 + public static int DIAMETER=30;//直径 + public Chess(int x,int y,Color color){//棋子构造函数 + this.x=x; + this.y=y; + this.color=color; + } + public int getX() { + return x; + } + public int getY() { + return y; + } + public Color getColor() { + return color; + } + +}