谁知道一款苹果的五子棋多少个棋子软件名字是全英文,下棋的时候棋子是被画出来的?

本帖子已过去太久远了,不再提供回复功能。当下软件园 / 汇聚当下最新最酷的软件下载站!
热门搜索:
您的位置:
> 五子棋经典版 V1.4 苹果版
五子棋经典版 V1.4 苹果版 / 五子棋经典版手游
网友评分:0分
  五子棋经典版是一款非常好玩的五子棋手游,该款游戏包含了人机对弈以及两人对弈两种游戏模式,并且还具有排行榜功能,随时随地和小伙伴们一起一较高下。
玩法介绍:
  1、五子棋是一个非常有挑战性的,下棋双方一方执黑子,一方执白子。在15行15列的棋盘上进行对弈。如果有一方首先将同色棋子连成5个。那这方就算赢棋了。
  2、快来和小伙伴们一起来玩充满趣味的五子棋吧,五子棋的规则十分简单,执黑子一方首先开局。来试试能用最少几步棋就可以把五子连在一起吧!
特色介绍:
  1、游戏分为两人对弈和人机对弈;
  2、游戏有标准的15x15的棋盘。用户体验极其贴心;
  3、棋盘可以放大和还原,从此不再会出现误下棋的情况;
  4、游戏有很贴心的悔棋功能;
  5、令人赏心悦目的游戏界面;
  6、近科完美的好听的游戏音乐。
更新日志:
  1、优化软件性能;
  2、修复若干Bug。
软件特别说明
QQ斗地主中国最火爆手机休闲游戏!三人斗,必有地主焉。玩法简单,娱乐性强,老少皆宜,快来试试吧!
刀塔传奇app是一个今年最热门的手机卡片手游,里面拥有dota游戏里各种英雄,原汁原味,玩家可以自由组合自己喜欢的英雄去战斗,让你感受Q版的Dota。
我是火影是目前手机卡牌类游戏中最热门的一款游戏。它的剧情内容来自连载超过15年的超人气漫画——《火影忍者》,还原了漫画人物、剧情、装备、尾兽,原汁原味的让你体验火影的魅力!
QQ欢乐斗地主是专为游戏爱好者制作的精彩、刺激的欢乐游戏。游戏过程中有刺激的明牌、加倍、炸弹等操作,有丰富的道具可以使用,完成游戏任务还有欢乐豆奖励可以获取。
我叫MT Online采用了卡牌战斗的方式,玩家可以在这里找到动漫中的各种角色,并且游戏还把《魔兽世界》中的各大副本以其独有的方式展现在玩家面前,带你重新找回那些年代魔兽的激情与友情,来吧,战斗吧,MT们!
其他版本下载
五子棋经典版 V1.4 苹果版
Copyright (C)
.All rights reserved.小项目(2)
前面我们已经画好的棋盘,接下来要实现控制功能,主要功能:
1)选择棋子
3)判断胜负
4)交换行棋方
先实现画棋子PART
------------------------------------------------------------画棋子代码示例如下------------------------------------------------------------
首先,定义一个棋子类,这个类有两个属性,棋子颜色(0-表示黑色,1-表示白色),是否落子(我计划用一个二维数组才存储棋子的落子信息)
Chessman.java
package xchen.test.simpleG
public class Chessman {
//1-white,0-black
private boolean placed =
public Chessman(int color,boolean placed){
this.color=
this.placed=
public boolean getPlaced() {
public void setPlaced(boolean placed) {
this.placed =
public int getColor() {
public void setColor(int color) {
this.color =
接着我们上一部分的画好棋盘的代码部分,新增画棋子的代码,我用两个棋子(一白一黑,分别位于棋盘的【8,8】,【7,7】)来检验画棋子的代码
DrawChessBoard.java
package xchen.test.simpleG
import java.awt.G
import java.awt.Graphics2D;
import java.awt.RadialGradientP
import java.awt.I
import java.awt.T
import java.awt.C
import javax.swing.JP
public class DrawChessBoard extends JPanel{
final static int BLACK=0;
final static int WHITE=1;
public int chessColor = BLACK;
public Image boardI
final private int ROWS = 19;
Chessman[][] chessStatus=new Chessman[ROWS][ROWS];
public DrawChessBoard() {
boardImg = Toolkit.getDefaultToolkit().getImage(&res/drawable/chessboard2.png&);
if(boardImg == null)
System.err.println(&png do not exist&);
//test draw chessman part simple
Chessman chessman=new Chessman(0, true);
chessStatus[7][7]=
Chessman chessman2 = new Chessman(1, true);
chessStatus[8][8]=chessman2;
//test draw chessman part simple
protected void paintComponent(Graphics g) {
// TODO Auto-generated method stub
super.paintComponent(g);
int imgWidth = boardImg.getHeight(this);
int imgHeight = boardImg.getWidth(this);
int FWidth = getWidth();
int FHeight= getHeight();
int x=(FWidth-imgWidth)/2;
int y=(FHeight-imgHeight)/2;
g.drawImage(boardImg, x, y, null);
int margin =
int span_x=imgWidth/ROWS;
int span_y=imgHeight/ROWS;
for(int i=0;i&ROWS;i++)
g.drawLine(x, y+i*span_y, FWidth-x,y+i*span_y);
for(int i=0;i&ROWS;i++)
g.drawLine(x+i*span_x, y, x+i*span_x,FHeight-y);
for(int i=0;i&ROWS;i++)
for(int j=0;j&ROWS;j++)
if(chessStatus[i][j]!=null&&chessStatus[i][j].getPlaced()==true)
System.out.println(&draw chessman &+i+& &+j);
int pos_x=x+i*span_x;
int pos_y=y+j*span_y;
int chessman_width=20;
float radius_b=20;
float radius_w=50;
float[] fractions = new float[]{0f,1f};
java.awt.Color[] colors_b = new java.awt.Color[]{Color.BLACK,Color.WHITE};
Color[] colors_w = new Color[]{Color.WHITE,Color.BLACK};
RadialGradientP
if(chessStatus[i][j].getColor()==1)
System.out.println(&draw white chess&);
paint = new RadialGradientPaint(pos_x-chessman_width/2f, pos_y-chessman_width/2f, radius_w*2, fractions, colors_w);
System.out.println(&draw black chess&);
paint = new RadialGradientPaint(pos_x-chessman_width/2f, pos_y-chessman_width/2f, radius_b*2, fractions, colors_b);
((Graphics2D)g).setPaint(paint);
((Graphics2D)g).fillOval(pos_x-chessman_width/2,pos_y-chessman_width/2,chessman_width,chessman_width);
主模块代码不变
package xchen.test.simpleG
import java.awt.C
import javax.swing.JF
import xchen.test.simpleGobang.DrawChessB
public class Main extends JFrame{
private DrawChessBoard drawChessB
public Main() {
drawChessBoard = new DrawChessBoard();
//Frame标题
setTitle(&单机五子棋&);
Container containerPane =getContentPane();
containerPane.add(drawChessBoard);
public static void main(String[] args) {
Main m = new Main();
m.setSize(800, 800);
m.setVisible(true);
运行一下!
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:23749次
积分:1489
积分:1489
排名:千里之外
原创:123篇
(34)(11)(6)(9)(5)(2)(2)(2)(1)(26)(6)(4)(12)(2)(2)(2)(1)(8)

我要回帖

更多关于 五子棋多少个棋子 的文章

 

随机推荐