六子冲棋01
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
package zlvchess;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.PrintStream;
import javax.swing.JFrame;
public class Lv13 extends JFrame
implements MouseListener
{
private static final long serialVersionUID = 1L; int state;
int xx;
int yy;
int[][] position;
int a;
int c;
int b;
int x;
int y;
int r;
int greennum;
int greeneat;
int orangenum;
int orangeeat;
boolean GREEN;
boolean G;
int a1;
int b1;
int c1;
int d1;
Font font;
String s;
String s1;
String s2;
String s4;
String s5;
String s6;
String s0;
String s3;
String s7;
String ssssssssss;
String ssssssss;
String sssssssss;
public Lv13()
{
this.state = 1;
this.position = new int[13][13];
this.position[2][2] = 1;
this.position[4][2] = 1;
this.position[2][6] = 1;
this.position[4][6] = 1;
this.position[0][4] = 1;
this.position[2][4] = 1;
this.position[4][4] = 1;
this.position[6][4] = 1;
this.position[0][0] = 2;
this.position[2][0] = 2;
this.position[4][0] = 2;
this.position[6][0] = 2;
this.position[0][2] = 2;
this.position[6][2] = 2;
this.position[0][8] = 3;
this.position[2][8] = 3;
this.position[4][8] = 3;
this.position[6][8] = 3;
this.position[0][6] = 3;
this.position[6][6] = 3;
this.a = 100; this.c = 100; this.b = 100;
this.r = (this.c / 4);
this.greennum = 0;
this.greeneat = 6;
this.orangenum = 0;
this.orangeeat = 6;
this.GREEN = true;
this.font = new Font("华文行楷", 1, 25);
this.s = "绿方先走! 请绿方点击自己棋子!";
this.s1 = "绿方走动步数:";
this.s2 = "黄方走动步数:";
this.s4 = "绿方的棋子数目:";
this.s5 = "黄方的棋子数目:";
this.s6 = "温馨提示:玩家执绿棋! ";
this.s0 = "游戏开始!";
this.s3 = null;
this.s7 = "player or computer:from_,_to_,_ ";
this.ssssssssss = "以下是一些判断!";
this.ssssssss = "以下电脑评分走棋";
this.sssssssss = "以下电脑按评分走棋";
setLayout(null);
setTitle("【单机版】六子冲棋1.0版作者:康子QQ858494658 微信号:hangkanghua 公众号:kzgzsz ");
addMouseListener(this);
setSize(1000, 700);
setLocationRelativeTo(null);
setDefaultCloseOperation(3);
setResizable(true);
setVisible(true);
}
public static void main(String[] args)
{
new Lv13();
}
public void paint(Graphics g)
{
super.paintComponents(g);
Graphics2D g2d = (Graphics2D)g;