亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? drawpoker.java

?? 爬蟲程序的實現
?? JAVA
字號:
/*
 * Class:        DrawPoker
 * Description:  Java Video Poker Applet.
 * Author:       Frank Maritato
 * Last Updated: 10/9/97
 **/

import java.applet.Applet;
import java.awt.*;
import java.io.BufferedInputStream;

public class DrawPoker extends Applet {
  
  public void init() {

    setLayout(new BorderLayout());
    resize(550,325);
    setBackground(backgroundColor);

    /** Bottom Labels **/
    Panel bottom = new Panel();
    bottom.setLayout(new FlowLayout(FlowLayout.LEFT));

    betLabel = new java.awt.Label("Bet:");
    betLabel.setForeground(Color.white);
    bottom.add(betLabel);

    betField = new java.awt.Label("0",Label.RIGHT);
    betField.setForeground(Color.white);
    bottom.add(betField);

    paidLabel = new java.awt.Label("Player Paid:",Label.RIGHT);
    paidLabel.setForeground(Color.white);
    bottom.add(paidLabel);
    
    paidField = new java.awt.Label("0",Label.RIGHT);
    paidField.setForeground(Color.white);
    bottom.add(paidField);
    
    MoneyLabel = new java.awt.Label("Credits: ");
    MoneyLabel.setForeground(Color.white);
    bottom.add(MoneyLabel);
    
    MoneyField = new java.awt.Label("0",Label.RIGHT);
    MoneyField.setForeground(Color.white);
    bottom.add(MoneyField);
    MoneyField.setText(""+myMoney);

    Panel gamepanel = new Panel();
    Label gameName = new Label("Game:");
    gameName.setForeground(Color.white);
    gameName.setBackground(backgroundColor);
    gamepanel.add(gameName);

    game = new Choice();
    game.setBackground(Color.black);
    game.setForeground(Color.white);
    game.addItem("Jacks Or Better");
    game.addItem("Bonus Poker");
    game.addItem("Double Bonus Poker");
    game.addItem("Deuces Wild");
    game.addItem("Joker Wild");
    gamepanel.add(game);
    bottom.add(gamepanel);
    add("South", bottom);

    /** East controls **/
    Panel right = new Panel();
    right.setLayout(new BorderLayout());

    Panel east = new Panel();
    east.setLayout(new GridLayout(3,1));

    betButton = new java.awt.Button("Bet 1");
    betButton.setForeground(Color.white);
    betButton.setBackground(Color.black);
    east.add(betButton);
    
    max = new java.awt.Button("Bet Max");
    max.setForeground(Color.white);
    max.setBackground(Color.black);
    east.add(max);
 
    deal = new java.awt.Button("Deal");
    deal.setForeground(Color.white);
    deal.setBackground(Color.black);
    east.add(deal);
    
    deal.disable();    
    right.add("South",east);
    add("East",right);

    loadImages();

    // Instantiate some arrays and Objects
    nodds = new int[12];
    codds = new String[12];
    newGame("Jacks Or Better");

  }

  /************************************************************************/
  private void loadImages() {
    MediaTracker tracker = new MediaTracker(this);
    Toolkit tk=Toolkit.getDefaultToolkit();
    images = new Image[5][14];
    for(int i=0;i<5;i++) {
      for(int j=0;j<14;j++) {
        if ((i == 0 && j == 0) ||
            (j != 0 && i != 4) ||
	    (i == 4 && j == 0)) {
	  try{
	    BufferedInputStream in = new BufferedInputStream
	      (getClass().getResourceAsStream("images/"+i+"-"+j+".gif"));
	    byte[] data = new byte[100000];
	    in.read(data);
	    images[i][j] = tk.createImage(data);
	    tracker.addImage(images[i][j],0);
	    tracker.waitForAll();
	  }
	  catch (Exception e) {
	    e.printStackTrace();
	  }
	}
      }
    }
  }
  
  /************************************************************************/
  public void update (Graphics g) {
    int x,y,xlen,ylen;
    
    y = 150;
    x = 0; xlen = 500; ylen = 15;
    
    g.setColor(backgroundColor);    
    if (redraw) {
      g.fillRect(0,0,500,350);
      redraw = false;
    } else {
      g.fillRect(x,y,xlen,ylen);
    }
    g.setColor(Color.white);
    paint(g); 
  }

  /************************************************************************/
  public void paint (Graphics g) {
    
    int 
      start,
      xpos, 
      ypos, 
      i    = 0;
    
    boolean 
      done = false;
    
    start = 10;
    xpos = 15;
    ypos = start;
    
    g.setColor(Color.white);
    g.drawString("Frank Maritato's Video Poker Version 2.2",xpos,ypos);
    
    start += 20;
    xpos = 15;
    ypos = start;
    while (codds[i] != null) {
      if (i == winningIndex) {
	g.setColor(Color.blue);
	g.fillRect(xpos-5,ypos-12,165,15);
	g.setColor(Color.yellow);
	g.drawString(codds[i],xpos,ypos);
	g.drawString(""+nodds[i]*myBet,xpos+130,ypos);
	g.setColor(Color.white);
	if (gameOver) {
	  myMoney += myBet*nodds[i];
	  paidField.setText(""+myBet*nodds[i]);
	}
      } else {
	g.drawString(codds[i],xpos,ypos);
	g.drawString(""+nodds[i]*myBet,xpos+130,ypos);
      }
      i++; 
      ypos += 15;
      if (i >= (currentLength/2) && !done) {
	xpos += 175;
	ypos = start;
	done = true;
      }
    }

    start += 140;
    xpos = 15;
    ypos = start;
    for (i=0;i<5;i++) {
      if (newDeal) {
	int a = h.hand[i].getSuit();
	int b = h.hand[i].getValue();
	g.drawImage(images[a-1][b],xpos,ypos,this);
	if (b == 2 && currentGame.equals("Deuces Wild")) {
	  g.setColor(Color.blue);
	  g.setFont(new Font("TimesRoman",Font.BOLD,18));
	  g.drawString("WILD",xpos+10,ypos+50);
	  g.setFont(new Font ("TimesRoman",Font.PLAIN,18));
	  g.setColor(Color.white);
	}
	//System.out.println("ypos "+ypos);
	if (h.hand[i].isHeld()) {
	  g.setFont(new Font("TimesRoman",Font.BOLD,18));
	  g.drawString("HELD",xpos+10,ypos-5);
	  g.setFont(new Font ("TimesRoman",Font.PLAIN,18));
	}
      } else 
	g.drawImage(images[0][0],xpos,ypos,this);

      xpos += 85;
    }
    if (gameOver) {
      start -= 40;
      xpos = 145;
      ypos = start;
      Font old = g.getFont();
      g.setFont(new Font("TimesRoman",Font.BOLD,24));
      g.setColor(Color.yellow);
      g.drawString("GAME OVER",xpos,ypos);
      g.setFont(new Font ("TimesRoman",Font.PLAIN,18));
      g.drawString("Play 5 coins",xpos+35,ypos+15);
      g.setColor(Color.white);
      g.setFont(old);
      myBet = 0;
    }

    MoneyField.setText(""+myMoney);
  }
  
  /************************************************************************/
  public boolean handleEvent(Event evt) {
    if (evt.id == Event.WINDOW_DESTROY)
      System.exit(0);
    return super.handleEvent(evt);
  }
  
  /************************************************************************/
  public boolean mouseDown (Event e, int x, int y) {
    int card1Start = 15;
    int card2Start = card1Start+85;
    int card3Start = card2Start+85;
    int card4Start = card3Start+85;
    int card5Start = card4Start+85;
    int  
      ytop,
      ybot;
    
    ytop = 165;
    ybot = ytop + images[0][0].getHeight(this);
    
    if (!gameOver) {
      redraw = false;
      if ( y > ytop && y < ybot) {
	if (x > card1Start && x < card1Start+70) {
	  hold(0);
	} else if ( x > card2Start && x < card2Start+70) {
	  hold(1);
	} else if ( x > card3Start && x < card3Start+70) {
	  hold(2);
	} else  if ( x > card4Start && x < card4Start+70) {
	  hold(3);
	} else if ( x > card5Start && x < card5Start+70) {
	  hold(4);
	}
      }
    }
    return true;
  }
  
  
  /************************************************************************/
  public boolean action (Event e, Object arg) {
    if (arg.equals("Bet 1")) {
      placeBet(1);
    } else if (arg.equals("Bet Max")) {
      placeBet(5);
    } else if (arg.equals("Deal")) {
      dealIt();
    } else if (arg.equals("Draw")) {
      draw();
    } else if (e.target instanceof Choice) {
      newGame(""+arg);
    }
    return true;
  }
  
  /************************************************************************/
  public void hold (int num) {
    if (h.hand[num].isHeld()) {
      h.hand[num].setHeld(false);
    } else {
      h.hand[num].setHeld(true);
    }
    repaint();
  }
  
  /************************************************************************/
  public void dealIt() {

    if (currentGame.equals("Joker Wild"))
      d = new CardDeck(1, true);
    else
      d = new CardDeck(1, false);
    
    h = new Hand(d.draw(), currentGame);
    for (int i=1;i<5;i++)
      h.Insert(d.draw());
    
    newDeal = true;
    paidField.setText("0");
    deal.setLabel("Draw");
    betButton.disable();
    max.disable();
    winningIndex = h.checkHand();
    redraw = true;
    repaint();
  }
  
  /************************************************************************/
  public void draw () {
    for(int i=0;i<5;i++) {
      if (!h.hand[i].isHeld()) {
	h.Delete(i);
	h.hand[i] = d.draw();
      }
    }
    resetIt();
    winningIndex = h.checkHand();
    gameOver = true;
    deal.disable();
    redraw = true;
    repaint();
  }
  
  /************************************************************************/
  public void resetIt() {
    deal.setLabel("Deal");
    betButton.enable();
    max.enable();
    game.enable();
    betField.setText(""+myBet);
  }

  /************************************************************************/
  public void placeBet(int n) {
    int
      thisbet = 0;

    if (n == 5) {
      thisbet = (5 - myBet);
      myBet = 5;
    } else {
      thisbet = 1;
      myBet++;
    }

    newDeal = false;
    betField.setText(""+myBet);
    deal.enable();
    myMoney -= thisbet;
    winningIndex = 11;

    if (myBet == 5) {
      betButton.disable();
      max.disable();
      dealIt();
    }

    game.disable();
    gameOver = false;
    redraw = true;
    repaint();
  }
  
  /************************************************************************/
  public void newGame (String arg) {
    newDeal = false;
    winningIndex = 11;
    currentGame = arg;
    codds[0] = "Royal Flush";
    nodds[0] = 800;
    if (arg.equals("Jacks Or Better")) {
      codds[1] = "Straight Flush";
      codds[2] = "4 of a Kind";
      codds[3] = "Full House";
      codds[4] = "Flush";
      codds[5] = "Straight";
      codds[6] = "3 of a Kind";
      codds[7] = "2 Pair";
      codds[8] = "Jacks or Better";
      codds[9] = null;
      codds[10]= null;
      currentLength = 9;
      nodds[1] = 50;
      nodds[2] = 25;
      nodds[3] = 8;
      nodds[4] = 5;
      nodds[5] = 4;
      nodds[6] = 3;
      nodds[7] = 2;
      nodds[8] = 1;
    } else if (arg.equals("Bonus Poker")) {
      codds[1]  = "Straight Flush";
      codds[2]  = "4 Aces";
      codds[3]  = "4 2's, 3's, 4's";
      codds[4]  = "4 5's - K's";
      codds[5]  = "Full House";
      codds[6]  = "Flush";
      codds[7]  = "Straight";
      codds[8]  = "3 of a Kind";
      codds[9]  = "2 Pair";
      codds[10] = "Jacks or Better";
      currentLength = 11;
      nodds[1]  = 50;
      nodds[2]  = 80;
      nodds[3]  = 40;
      nodds[4]  = 25;
      nodds[5]  = 8;
      nodds[6]  = 5;
      nodds[7]  = 4;
      nodds[8]  = 3;
      nodds[9]  = 2;
      nodds[10] = 1;
    } else if (arg.equals("Double Bonus Poker")) {
      codds[1]  = "Straight Flush";
      codds[2]  = "4 Aces";
      codds[3]  = "4 2's, 3's, 4's";
      codds[4]  = "4 5's - K's";
      codds[5]  = "Full House";
      codds[6]  = "Flush";
      codds[7]  = "Straight";
      codds[8]  = "3 of a Kind";
      codds[9]  = "2 Pair";
      codds[10] = "Jacks or Better";
      currentLength = 11;
      nodds[1]  = 50;
      nodds[2]  = 160;
      nodds[3]  = 80;
      nodds[4]  = 50;
      nodds[5]  = 10;
      nodds[6]  = 7;
      nodds[7]  = 5;
      nodds[8]  = 3;
      nodds[9]  = 1;
      nodds[10] = 1;
    } else if (arg.equals("Deuces Wild")) {
      codds[1]  = "4 Deuces";
      codds[2]  = "Royal Flush w/2's";
      codds[3]  = "5 of a Kind";
      codds[4]  = "Straight Flush";
      codds[5]  = "4 of a Kind";
      codds[6]  = "Full House";
      codds[7]  = "Flush";
      codds[8]  = "Straight";
      codds[9]  = "3 of a Kind";
      codds[10] = null;
      currentLength = 10;
      nodds[1]  = 200;
      nodds[2]  = 50;
      nodds[3]  = 16;
      nodds[4]  = 13;
      nodds[5]  = 4;
      nodds[6]  = 4;
      nodds[7]  = 3;
      nodds[8]  = 2;
      nodds[9]  = 1;
    } else if (arg.equals("Joker Wild")) {
      codds[1]  = "Royal Flush w/Joker";
      codds[2]  = "5 of a Kind";
      codds[3]  = "Straight Flush";
      codds[4]  = "4 of a Kind";
      codds[5]  = "Full House";
      codds[6]  = "Flush";
      codds[7]  = "Straight";
      codds[8]  = "3 of a Kind";
      codds[9]  = "2 Pair";
      codds[10] = "Kings or Better";
      currentLength = 11;
      nodds[1]  = 100;
      nodds[2]  = 200;
      nodds[3]  = 50;
      nodds[4]  = 15;
      nodds[5]  = 6;
      nodds[6]  = 4;
      nodds[7]  = 3;
      nodds[8]  = 2;
      nodds[9]  = 1;
      nodds[10] = 1;
    }
    redraw = true;
    repaint();
  }
  
  // ** Variables **
  Image
    images[][];
  
  int
    myBet        = 0,
    myMoney      = 100,
    winningIndex = 11,
    nodds[],
    currentLength;

  String      
    codds[], 
    currentGame;
  
  static String 
    OSNAME = "";

  CardDeck    
    d;

  Hand        
    h;

  boolean
    newDeal = false,
    gameOver= true,
    redraw=true;
  
  Color 
    backgroundColor = new Color(0,100,0);
  
  //{{DECLARE_CONTROLS
  java.awt.Button deal;
  java.awt.Label label1;
  java.awt.Label betLabel;
  java.awt.Button max;
  java.awt.Button betButton;
  java.awt.Label MoneyField;
  java.awt.Label MoneyLabel;
  java.awt.Label betField;
  java.awt.Label paidLabel;
  java.awt.Label paidField;
  Choice game;
  //}}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
五月婷婷激情综合网| 精品一区二区三区蜜桃| 一本色道综合亚洲| 国产精品二三区| 不卡的av网站| 中文字幕一区二区三区不卡在线| 国产一区二区h| 久久久久亚洲蜜桃| 国产精品18久久久久| 国产喂奶挤奶一区二区三区| 国产激情视频一区二区三区欧美| 久久久久亚洲蜜桃| 成人免费的视频| 中文字幕一区二区三区四区不卡| jlzzjlzz亚洲日本少妇| 亚洲男同1069视频| 在线免费观看不卡av| 午夜欧美大尺度福利影院在线看| 欧美区视频在线观看| 琪琪一区二区三区| 26uuu亚洲综合色| 国产成a人无v码亚洲福利| 国产精品久久毛片a| 99re视频精品| 无吗不卡中文字幕| 精品久久一区二区三区| 国产成人自拍网| 亚洲欧洲国产专区| 在线精品视频一区二区三四| 亚洲成人高清在线| 日韩欧美卡一卡二| 国产成人在线看| 亚洲色图制服诱惑| 欧美视频日韩视频| 奇米一区二区三区av| 久久久久久久综合色一本| 粉嫩高潮美女一区二区三区| 亚洲丝袜自拍清纯另类| 欧美在线你懂的| 蜜桃视频在线观看一区| 国产亚洲成av人在线观看导航| av激情综合网| 天天亚洲美女在线视频| 久久嫩草精品久久久精品| 91麻豆蜜桃一区二区三区| 香蕉影视欧美成人| 久久久亚洲国产美女国产盗摄| 97久久精品人人做人人爽50路| 亚洲成人av一区二区三区| 欧美mv日韩mv国产| 99久久精品国产毛片| 日产国产高清一区二区三区| 国产日产欧产精品推荐色| 日本韩国欧美一区二区三区| 免费成人你懂的| 欧美激情一区二区三区蜜桃视频| 在线亚洲一区观看| 激情综合色综合久久综合| 国产精品夫妻自拍| 日韩一二三四区| bt7086福利一区国产| 日韩在线a电影| 国产精品视频一二三区| 欧美日韩一二三| 懂色av中文一区二区三区| 午夜视频在线观看一区| 国产清纯美女被跳蛋高潮一区二区久久w | 欧美精品18+| 国产成人超碰人人澡人人澡| 亚洲成人www| 中文字幕中文字幕一区| 欧美一区二区人人喊爽| 不卡的av电影| 久久成人综合网| 一区二区三区四区精品在线视频| 欧美成人在线直播| 在线免费观看日韩欧美| 国产91对白在线观看九色| 午夜精品久久久| 日韩一区在线播放| 精品日韩在线一区| 欧美日韩视频一区二区| 成av人片一区二区| 老司机精品视频一区二区三区| 色综合色综合色综合色综合色综合| 蜜臀av国产精品久久久久| 樱花影视一区二区| 国产婷婷色一区二区三区四区| 欧美精品国产精品| 91麻豆国产福利在线观看| 国产激情精品久久久第一区二区 | 懂色av一区二区三区免费观看| 午夜av电影一区| 亚洲精品乱码久久久久| 国产欧美一区二区精品忘忧草| 欧美一区二区三区精品| 在线免费av一区| 91丨九色丨黑人外教| 国产经典欧美精品| 国内精品久久久久影院色| 日韩va欧美va亚洲va久久| 亚洲国产视频a| 亚洲欧美日韩国产综合在线| 欧美极品美女视频| 精品美女在线观看| 7799精品视频| 欧美视频一区二区在线观看| 色综合久久久网| av资源网一区| 国产69精品久久777的优势| 韩国理伦片一区二区三区在线播放| 日韩一区欧美二区| 亚洲成人激情av| 亚洲电影欧美电影有声小说| 亚洲一区二区不卡免费| 亚洲精品一二三| 亚洲欧美日韩国产综合| 亚洲色图在线看| 国产精品传媒在线| 国产精品免费久久| 国产精品人人做人人爽人人添| 久久久亚洲精华液精华液精华液| xf在线a精品一区二区视频网站| 日韩久久免费av| 欧美成人国产一区二区| 精品少妇一区二区三区免费观看| 欧美大黄免费观看| 欧美r级在线观看| 久久久亚洲高清| 国产婷婷精品av在线| 国产精品天干天干在线综合| 亚洲一区二区五区| 在线国产亚洲欧美| 欧美亚洲动漫精品| 欧美日韩另类一区| 欧美丰满嫩嫩电影| 欧美大片在线观看一区| 精品久久久久一区二区国产| 久久网站热最新地址| 久久精品人人爽人人爽| 国产精品污www在线观看| 中文字幕日韩欧美一区二区三区| 中文字幕亚洲视频| 亚洲人成在线观看一区二区| 亚洲精品亚洲人成人网在线播放| 亚洲一区二区三区三| 日韩福利电影在线| 久草这里只有精品视频| 粉嫩蜜臀av国产精品网站| 91日韩在线专区| 欧美午夜片在线观看| 91麻豆精品国产91久久久久久| 日韩三区在线观看| 国产亲近乱来精品视频| 中文字幕一区二区三区在线播放 | xnxx国产精品| 中文字幕中文在线不卡住| 亚洲精品少妇30p| 亚洲高清视频在线| 毛片基地黄久久久久久天堂| 国产精品一区二区在线观看不卡 | 老司机一区二区| 国产福利视频一区二区三区| av电影天堂一区二区在线观看| 在线观看成人小视频| 欧美一区二区视频在线观看2022 | 中文字幕制服丝袜一区二区三区 | 蜜臀av性久久久久蜜臀aⅴ流畅| 国产乱人伦偷精品视频免下载| 99久久综合精品| 欧美久久久久免费| 久久久精品影视| 亚洲欧美另类小说| 免费成人美女在线观看.| 国产激情精品久久久第一区二区 | 99久久精品免费看| 欧美精品99久久久**| 国产区在线观看成人精品| 亚洲一二三专区| 国产一区二区三区日韩 | 91成人免费网站| 精品国产乱码久久久久久夜甘婷婷| 国产精品沙发午睡系列990531| 一区二区日韩av| 精品一区二区三区在线播放视频| 91网站在线观看视频| 欧美一级在线视频| 中文字幕一区二区三区在线播放| 日韩精品一区第一页| 成人美女视频在线观看| 91精品国产免费| 国产精品不卡在线观看| 免费观看一级特黄欧美大片| 99久久久精品| 精品久久久久久久一区二区蜜臀| 亚洲欧美另类综合偷拍| 国产毛片精品国产一区二区三区| 欧美视频三区在线播放| 国产精品日韩成人| 精品一区二区三区免费播放|