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

📄 interfaces.java

📁 一个用JAVA APPLET编写的俄罗斯方块游戏.俄螺丝方块这个游戏不用多介绍了吧
💻 JAVA
字号:
package russion;import java.awt.*;import java.util.*;/** * <p>Title: RussionCube</p> * <p>Description: TheClassicGame</p> * <p>Copyright: Copyright (c) 2002</p> * <p>Company: Cqu</p> * @author Ghostliang * @version 1.0 */public class Interfaces {  private GameInterface gameInterface;  private InfoInterface infoInterface;  private Cube currentCube,nextCube;  private Color backGround;  private int width,height;  public static Color[] colors = {Color.red,Color.orange,Color.gray,Color.green,    Color.blue,Color.pink,Color.magenta,Color.white};  public Interfaces()  {    this(20,20,18,11,20,Color.white,Color.white,Color.black,colors,1);  }  public Interfaces(int startX,int startY,int totalRow,int totalCol,int blockSize,                    Color backGround,Color interfaceBackGround,Color frontGround,Color[] colors,int baseLevel)  {    this.backGround = backGround;    this.colors = colors;    currentCube = new Cube(0,totalCol / 2 - 1,blockSize,(int)(Math.random() * 7),colors);    nextCube = new Cube(0,0,blockSize,(int)(Math.random() * 7),colors);    this.gameInterface = new GameInterface(startX,startY,totalRow,totalCol,blockSize,interfaceBackGround);    this.gameInterface.initCurrentCube(currentCube);    this.gameInterface.setCurrentCube(currentCube);    this.infoInterface = new InfoInterface(startX + 20 + totalCol * blockSize,startY,totalRow * blockSize,nextCube,interfaceBackGround,frontGround,baseLevel);    this.width = startX + totalCol * blockSize + 160;    this.height = startY + totalRow * blockSize + 20;  }  public GameInterface getGameInterface()  {    return this.gameInterface;  }  public InfoInterface getInfoInterface()  {    return this.infoInterface;  }  public Cube getCurrentCube()  {    return this.currentCube;  }  public Cube getNextCube()  {    return this.nextCube;  }  public void setBackGround(Color color)  {    this.backGround = color;  }  public Color getBackGround()  {    return this.backGround;  }  public int getWidth()  {    return this.width;  }  public int getHeight()  {    return this.height;  }}

⌨️ 快捷键说明

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