⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gold.java

📁 一个五子棋游戏
💻 JAVA
字号:
import java.awt.*;

public class gold{
	private int xPos, yPos;
	private Rectangle Gold;
	private int goldSpecies;


	public gold(int a, int b, int c){
		xPos = a;
		yPos = b;
		 goldSpecies = c;
		Gold = new Rectangle(xPos - 2, yPos - 2, 5, 5);
	}

	public void draw(Graphics g){
		g.setColor(Color.yellow);
		if(goldSpecies == 1)
			g.fillOval(xPos - 2, yPos - 2, 4, 4);
		if(goldSpecies == 2)
			g.fillOval(xPos - 4, yPos - 4, 9, 9);
	}

	public Rectangle getBorder(){
		return Gold;
	}

	public boolean bigGold(){
		return goldSpecies == 2;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -