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

📄 queenmodel.java

📁 八皇后游戏
💻 JAVA
字号:
/*
 * QueenModel.java
 *
 * Created on 2008年3月9日, 下午12:07
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package javaapplication15;

/**
 *
 * @author vivi
 */
public class QueenModel {
    private int width;
    private int modeChess;
    
    /** Creates a new instance of QueenModel */
    public QueenModel(){}
    public QueenModel(int modeChess) {              //游戏模式

        if(modeChess==1){
            getinfor(4,modeChess);
        }
        if(modeChess==2){
            getinfor(5,modeChess);
        }
        if(modeChess==3){
            getinfor(6, modeChess);
        }
        if(modeChess==4){
            getinfor(7, modeChess);
        }
        if(modeChess==5){
            getinfor(8, modeChess);
        }
        if(modeChess==6){
            getinfor(9, modeChess);
        }
        if(modeChess==7){
            getinfor(10,modeChess);
        }
        if(modeChess==8){
            getinfor(11, modeChess);
        }
        if(modeChess==9){
            getinfor(12, modeChess);
        }
    }

     public int getwidth() {
        return this.width;                           //得到棋盘边长
    }

 

    int getModeChess() {
        return this.modeChess;                        //得到棋盘模式
    }

    public void getinfor(int width, int modeChess) {
        this.width=width;
        this.modeChess=modeChess;
       
    }

}

⌨️ 快捷键说明

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