📄 blackjack.java
字号:
import java.applet.Applet; // for Applet
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import javax.swing.*;
class CARD
{
public int no;
public int x, y;
public boolean showingBack;
private final int pokerW=71, pokerH=96; // constants
public CARD()
{
this(0); // same as calling constructor CARD(0)
}
public CARD(int n)
{
no = n;
showingBack = true;
}
public void setXY(int x, int y)
{
this.x = x;
this.y = y;
}
public boolean isHit(int cx, int cy)
{
if ( cx<x || cx>=x+pokerW || cy<y || cy>y+pokerH )
return false;
else
return true;
}
// setXY(.)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -