「java匹配游戏」匹配的小游戏

博主:adminadmin 2023-01-05 00:57:07 901

本篇文章给大家谈谈java匹配游戏,以及匹配的小游戏对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。

本文目录一览:

高分求好玩的JAVA游戏

我推荐国外的吧:

1、英雄传说——索迪亚之风(韩国ARPG,hands on 代理,minisoyo BAM组汉化,1M)

2、荒岛余生(APRG类,一个小岛上的解谜游戏,500K,已汉化)

3、魔法利刃(国外RPG 3D大作,1M,已汉化)

4、宝石迷情(gameloft益智游戏,很耐玩,300K左右,无汉化,但是英文很简单,隐藏关卡很多。)

5、工人物语(策略类的,已汉化,500K)

还有很多很多很多,就不知道你啥手机了

先推荐5个吧

以上够你玩蛮久了

对了

英文好的话

推荐你玩一款RPG

吸血鬼黎明(vampires dawn)

个人非常喜欢的

下载包500K,安装完以后1M

文本量很大

我玩了30个小时....

用Java做井字棋游戏

以前写过一个java的井字棋 ,

其中的重点是要判断每走一步后,是否有比赛的结果(输,赢,平)

可以使用swing 来作为外观进行显示.

表示棋盘如下

0 1 2

3 4 5

6 7 8

定义一个二维数组,每次走完后,匹配该数组, 如果匹配成功就赢了

int[][] WIN = { { 0, 1, 2 }, { 3, 4, 5 }, { 6, 7, 8 }, { 0, 3, 6 }, { 1, 4, 7 }, { 2, 5, 8 }, { 0, 4, 8 },

{ 2, 4, 6 } };

效果图

当然了,因为井字棋比较简单, 可以写一个比较简单的判断局势,然后自动下棋的AI .

(AI使用了很多的if else判断, 比如人现在的情况是什么样的,有几个棋子连在一起了,电脑自己的情况是怎么样的)

java游戏有哪些

一:丁丁历险记

智能手机版的《丁丁历险记》以3D画面呈现,游戏效果非常出众,也是很值得玩的一款闯关游戏,而塞班版本由于受限于硬件条件,风格只能改为2D,但是游戏性还是有的。

 二: 地牢猎手3

地牢猎手是Gameloft旗下最有名的一个ARPG系列,很多玩家知道Gameloft都是从地牢猎手开始的,3代虽然变革得比较多,但依然是值得夸赞的一部作品,而塞班版本的地牢猎手3还支持官方中文哦。

三:罪恶都市3:迈阿密风云

R星大名鼎鼎的罪恶都市系列可谓无人不知无人不晓,3代也是被登录游戏平台最多的一代作品,不过这款塞班的《罪恶都市3迈阿密风云》则是Gameloft的山寨之作。这里也不得不说,Gameloft不但拥有不错的原创作品,而山寨名作的功力也是非同一般。

四:现代战争2黑色飞马

虽然此“现代战争”非彼“现代战争”,但是在手游平台上,该“现代战争”系列足以媲美主机、PC上的“现代战争”,而当年的《现代战争2黑色飞马》真心是款素质颇高的神作!

以前步步高手机有一个Java应用游戏,主要是隋唐什么的,战略游戏,有士兵,枪兵,武斗兵,投石车,将军等

名称叫隋唐英雄传,原先用洛基亚手机 玩的挺好的,后来坏掉了就再没玩了,网上原先当乐网是有的 现在找不到了

用java 做猜数字游戏程序。我做的java程序 运行不出来。高手帮忙改一下!

public void test(input,data){

int[] a=new int[4];

int[] b=new int[4];

int input;

for(int i=0;i4;i++){

a[i]=input%10;

input=input/10;

}

for(int k=0;k4;k++){

a[k]=data%10;

data=data/10;

}

int sumA=0;

int sumB=0;

for(int x=0;x4;x++){

for(int y=0;y4;y++){

if(a[x]==b[y]x==y){

sumA=sumA+1;

}else if(a[x]==b[y]x!=y){

sumB=sumB+1;

}

}

}

System.out.print(input+" "+sumA+"A"+sumB+"B");

}

可能有错 但是大概就这样了吧~ 你可以具体参考一下中间的循环算法 然后对于第一个问题呢 你只要在你的第一个文件中import下面用package 第二个文件路径;就可以了 你都没有导入到第一个 那肯定出不来啦~

这是用Java程序编的一个配对游戏但怎么修改程序才能使游戏运行

import java.awt.BorderLayout;

import java.awt.Color;

import java.awt.Dimension;

import java.awt.FlowLayout;

import java.awt.Point;

import java.awt.event.MouseEvent;

import java.awt.event.MouseListener;

import java.awt.event.MouseMotionListener;

import javax.swing.ImageIcon;

import javax.swing.JFrame;

import javax.swing.JLabel;

import javax.swing.JPanel;

import javax.swing.SwingConstants;

import javax.swing.border.LineBorder;

public class test extends JFrame implements MouseListener, MouseMotionListener {

private static final boolean fasle = false;

private JLabel img[] = new JLabel[5];

private JLabel targets[] = new JLabel[5];

private Point pressPoint;

public test() {

super("简易配对游戏");

this.setLayout(new BorderLayout());

this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

final JPanel imagePanel = new JPanel();

imagePanel.setLayout(null);

imagePanel.setOpaque(false);

setGlassPane(imagePanel);

getGlassPane().setVisible(true);

ImageIcon icon[] = new ImageIcon[5];

icon[0] = new ImageIcon(getClass().getResource("kafei.png"));

icon[1] = new ImageIcon(getClass().getResource("xianshiqi.png"));

icon[2] = new ImageIcon(getClass().getResource("xiyiji.png"));

icon[3] = new ImageIcon(getClass().getResource("yifu.png"));

icon[4] = new ImageIcon(getClass().getResource("zixingche.png"));

final JPanel bottomPanel = new JPanel();

bottomPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 20, 5));

this.add(bottomPanel, BorderLayout.SOUTH);

for (int i = 0; i 5; i++) {

img[i] = new JLabel(icon[i]);

img[i].setSize(600, 600);

img[i].setBorder(new LineBorder(Color.BLUE));

int x = (int) (Math.random() * (getWidth() - 50));

int y = (int) (Math.random() * (getHeight() - 150));

img[i].setLocation(x, y);

img[i].addMouseListener(this);

imagePanel.add(img[i]);

targets[i] = new JLabel();

targets[i].setOpaque(true);

targets[i].setBackground(Color.BLUE);

targets[i].setHorizontalTextPosition(SwingConstants.CENTER);

targets[i].setVerticalTextPosition(SwingConstants.BOTTOM);

targets[i].setPreferredSize(new Dimension(80, 80));

targets[i].setHorizontalAlignment(SwingConstants.CENTER);

bottomPanel.add(targets[i]);

}

targets[0].setText("咖啡");

targets[1].setText("显示器");

targets[2].setText("洗衣机");

targets[3].setText("衣服");

targets[4].setText("自行车");

}

public void mousePressed(MouseEvent e) {

pressPoint = e.getPoint();

}

public void mouseReleased(MouseEvent e) {

if (Check()) {

getGlassPane().setVisible(true);

for (int i = 0; i 5; i++) {

targets[i].setText("配对成功");

}

}

}

private boolean Check() {

boolean result = true;

for (int i = 0; i 5; i++) {

Point location = img[i].getLocationOnScreen();

Point seat = targets[i].getLocationOnScreen();

targets[i].setBackground(Color.orange);

if (location.x seat.x || location.y seat.y

|| location.x seat.x + 80 || location.y seat.y + 80) {

targets[i].setBackground(Color.blue);

result = fasle;

}

}

return result;

}

public void mouseEntered(MouseEvent e) {

}

public void mouseExited(MouseEvent e) {

}

public void mouseClicked(MouseEvent e) {

}

public void mouseMoved(MouseEvent e) {

}

public void mouseDragged(MouseEvent e) {

JLabel sourse = (JLabel) e.getSource();

Point imgPoint = sourse.getLocation();

Point point = e.getPoint();

sourse.setLocation(imgPoint.x + point.x - pressPoint.x, pressPoint.y

+ point.y - pressPoint.y);

}

public static void main(String[] args) {

test t = new test();

}

}

//我没有图片 报空指针 你在你那跑一下 应该能跑起来

关于java匹配游戏和匹配的小游戏的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。