1.微软å
¬å¸çº¸çç¨åºä»£ç
2.JAVAèè纸ç
3.请问怎样用visual basic编写一个扑克牌程序?
å¾®è½¯å ¬å¸çº¸çç¨åºä»£ç
è¿ä¸ªçº¸çç¨åºçæºä»£ç ï¼åªæå¾®è½¯å ¬å¸çä¸é¨ç软件å¼å人åç¥éäºãå«çä»»ä½äººæ¯æ æ³ç¥éçãå 为软件æºä»£ç æ¯å ·æä¿å¯æ§çã
JAVAèè纸ç
æ们åä½ä¸ï¼åäºä¸ªæå çç游æï¼ä¸è¿ä¸æ¯èèçï¼æ²¡ææ·»å åºçè§åç®æ³çãåç»ä½ ï¼ä½ èªå·±ççãã纸çè¦èªå·±ä¸ï¼æååæ¹æ0--çæ°åï¼èé¢ååæ¹ærear,纸牌横åèé¢æ¹ærearheng.jpg
package com;
import java.awt.Color;
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
public class puke implements MouseListener,ActionListener{
public JFrame frame=new JFrame("æå çåç");
public JButton button=new JButton("Start");
public JPanel pbutton=new JPanel();
public JPanel north=new JPanel();
public JPanel west=new JPanel();
public JPanel south=new JPanel();
public JPanel east=new JPanel();
public JPanel middle=new JPanel();
public Container container=frame.getContentPane();
public static JLabel[] l=new JLabel[];
public static JLabel[] ll =new JLabel[];
@SuppressWarnings("unchecked")
public static Set set=new HashSet();
public static JLabel[] l1=new JLabel[];
public static JLabel[] l2 =new JLabel[];
public static JLabel[] l3 =new JLabel[];
public static JLabel[] l4 =new JLabel[];
public static JLabel[] ll1 =new JLabel[];
public static JLabel[] ll2 =new JLabel[];
public static JLabel[] ll3 =new JLabel[];
public static JLabel[] ll4=new JLabel[];
boolean gstar=false;
int nn=ll.length;
int n=l.length;
int s=0;
int x=0,y=0;
@SuppressWarnings("unchecked")
public puke(){
frame.setBounds(0, 0, , );
container.setLayout(null);
north.setLayout(null);
west.setLayout(null);
south.setLayout(null);
east.setLayout(null);
north.setBounds(, 0, , );
north.setBackground(Color.GREEN);
west.setBounds(0,,,);
west.setBackground(Color.RED);
south.setBounds(,,,);
south.setBackground(Color.PINK);
east.setBounds(, , , );
east.setBackground(Color.BLUE);
pbutton.setBounds(, ,, );
middle.setBounds(, , , );
middle.setBackground(Color.YELLOW);
for(int i=0;i<l.length;i++){
l[i]=new JLabel(new ImageIcon("src/com/rear.jpg"));
l[i].setBounds(+x,,,);
container.add(l[i]);
x+=5;
}
for(int i=0;i<ll.length;i++){
ll[i]=new JLabel(new ImageIcon("src/com/"+i+".jpg"));
set.add(ll[i]);
}
button.addActionListener(this);
pbutton.add(button);
container.add(north);
container.add(west);
container.add(south);
container.add(east);
container.add(pbutton);
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
compare();
}
@SuppressWarnings({ "unchecked", "unchecked" })
public void play()//ååæ£é¢å¼ ç
{
Iterator<JLabel> it = set.iterator();
while(it.hasNext()){
for(int i=0;i<;i++){
if(nn%4==0){
ll1[i]=(JLabel) it.next();
nn--;}
if(nn%4==3){
ll2[i]=(JLabel) it.next();
nn--;}
if(nn%4==2){
ll3[i]=(JLabel) it.next();
nn--;}
if(nn%4==1){
ll4[i]=(JLabel) it.next();
nn--;}
}
}
}
public void move()//å®æåçï¼æ¯ä½ç©å®¶å¾å°å¼ ç
{
play();
int i;
while(n!=0){
for(i=0;i<;i++){
if(s<){
if(n%4==0){
l1[i]=l[s];
l1[i].setBounds(-+x, , , );
north.add(l1[i]);
try {
Thread.sleep(3);
} catch (InterruptedException e) {
e.printStackTrace();
}
x+=;
s++;
n--;
continue;
}
if(n%4==3){
l[s].setIcon(new ImageIcon("src/com/rearheng.jpg"));
l2[i]=l[s];
l2[i].setBounds(, +y,,);
west.add(l2[i]);
try {
Thread.sleep(3);
} catch (InterruptedException e) {
e.printStackTrace();
}
y+=;
s++;
n--;
continue;
}
if(n%4==2){
l[s].setIcon(null);
l3[i]=ll3[i];
l3[i].setBounds(-x, , , );
l3[i].addMouseListener(this);
south.add(l3[i]);
try {
Thread.sleep(3);
} catch (InterruptedException e) {
e.printStackTrace();
}
x+=;
s++;
n--;
continue;
}
if(n%4==1){
l[s].setIcon(new ImageIcon("src/com/rearheng.jpg"));
l4[i]=l[s];
l4[i].setBounds(,-y,,);
east.add(l4[i]);
try {
Thread.sleep(3);
} catch (InterruptedException e) {
e.printStackTrace();
}
y+=;
s++;
n--;
continue;
}
}
}
}
button.setVisible(false);
pbutton.remove(button);
container.remove(pbutton);
container.add(middle);
frame.repaint();
}
public void mouseClicked(MouseEvent e)//ç¹å»é¼ æ åºç
{
for(int i=0;i<;i++){
if(gstar){
middle.remove(l3[i]);
middle.remove(ll1[i]);
middle.remove(ll2[i]);
middle.remove(ll4[i]);
if(e.getSource()==l3[i]){
north.remove(l1[i]);
west.remove(l2[i]);
east.remove(l4[i]);
south.remove(l3[i]);
middle.add(l3[i]);
middle.add(ll1[i]);
middle.add(ll2[i]);
middle.add(ll4[i]);
l3[i].setBounds(l3[i].getBounds().x, , , );
ll1[i].setBounds(, , , );
ll2[i].setBounds(, , , );
ll3[i].setBounds(, , , );
ll4[i].setBounds(, , , );
frame.repaint();
}
}
}
}
public void mouseEntered(MouseEvent e) //éæ©è¦åºçç
{
for(int i=0;i<;i++){
if(gstar){
if(e.getSource()==l3[i]){
l3[i].setBounds(l3[i].getBounds().x, l3[i].getBounds().y-, , );
}
}
}
}
public void mouseExited(MouseEvent e) {
for(int i=0;i<;i++){
if(gstar){
if(e.getSource()==l3[i]){
l3[i].setBounds(l3[i].getBounds().x,l3[i].getBounds().y+, , );
}}}
}
public puke getthis(){
return this;
}
public void mousePressed(MouseEvent e) {
}
public void mouseReleased(MouseEvent e) {
}
public static void main(String[]args){
new puke();
}
public class TestThread extends Thread{
private puke g=null;
public TestThread(puke g){
this.g=g;
}
public void run() {
while(true){
g.move();
try {
Thread.sleep();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
public void actionPerformed(ActionEvent e) //ç¹å»æé®äºä»¶
{
if(e.getSource()==button){
gstar=true;
TestThread t= new TestThread(this);
t.start();
}
}
@SuppressWarnings("unchecked")
public int compare(){
JLabel[] lab=new JLabel[ll.length];
String[] str=new String[ll.length];
set.toArray(lab);
for(int l=0;l<ll.length;l++){
str[l]=lab[l].getIcon().toString();
System.out.println(str[l]);
}
return n;
}
}
请问怎样用visual basic编写一个扑克牌程序?
一般都是用Java做的,JAVA动态创建控件很方便。识别VB也可以,源码最老土最简单的纸牌办法,是识别gabor小波 LBP 源码在资源文件里把张牌的画好,上下左右象扑克牌理牌一样藏半边漏半边排好,源码6位直播源码让他们不显示,纸牌发牌的识别时候用计时器依次让他们显示,后台配音,源码象真的纸牌在发排一样,发多少显示多少,识别居中排列。源码出牌位置也一样的纸牌拼团源码.net画,出多少显示多少,识别就是源码一个给image加载的过程,不让他显示就清空。
在出牌下面放三个按钮:出牌、医院物资管理 源码过牌、提示。控制他的visible属性,拉四个小闹钟,环信3.2.2源码中间放个text显示倒计时,论到谁就做哪部分操作。如何去计算胜出和大小就依据名称就好了,如何去组织牌型
选派牌出牌也是一样的,鼠标经过,鼠标点击是个什么事件,先写一个类,再遍历控件,统一调用就好了。
总体来讲纸牌游戏是所有游戏开发中最简单的游戏,腾讯在这上面不知道捞了多少金,其实原理相当简单