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

📄 tconst.java

📁 DoCoMo 手机Java源码 -- Game For Cricket
💻 JAVA
字号:

public class TConst {
    // Mark points
    public static final int MARK_20             = 20;
    public static final int MARK_19             = 19;
    public static final int MARK_18             = 18;
    public static final int MARK_17             = 17;
    public static final int MARK_16             = 16;
    public static final int MARK_15             = 15;
    public static final int MARK_CT             = 25;
    // Press Key
    public static final int KEY_0               = 0;
    public static final int KEY_1               = 1;
    public static final int KEY_2               = 2;
    public static final int KEY_3               = 3;
    public static final int KEY_4               = 4;
    public static final int KEY_5               = 5;
    public static final int KEY_6               = 6;
    public static final int KEY_7               = 7;
    public static final int KEY_8               = 8;
    public static final int KEY_9               = 9;    
    // 攞悢MULTIPLE
    public static final int MULTIPLE_0          = 0;
    public static final int MULTIPLE_1          = 1;
    public static final int MULTIPLE_2          = 2;
    public static final int MULTIPLE_3          = 3;
    // 儊僀儞夋柺
    public static final int MAIN_RECT           = 5;
    public static final int SUB_CURSOR          = 7;
    public static final int WORD_WIDTH          = 12;
    public static final int CIRCLE_WIDTH        = 10;
    // 儊僀儞夋柺怓
    public static final int FOREGROUND          = TColor.WHITE;    
    public static final int BACKGROUND          = TColor.BLACK;
    public static final int CURSORCOLOR         = TColor.YELLOW;
    public static final int CLOSECOLOR          = TColor.GRAY;
    // Divide彍嶼
    public static final int DIVIDE_MAIN_X       = 3;
    public static final int DIVIDE_MAIN_Y       = 10;
    public static final int DIVIDE_SUB_CURSOR   = 7;
    public static final int DIVIDE_MARGIN       = 2;
    // Mark宍幃僼儔僌
    public static final boolean DRAW_MARK       = true;
    // Player
    public static final int PLAYER_MAX_MARK     = 60;
    public static final int MAX_ROUND           = 20;
    public static final int ONE_ROUND_COUNT     = 3;
    public static final int MAX_PLAYER_CNT      = 4;
    public static final String WINNER           = " (WINNER) ";

    public static int getTermColor(int term){
        int color = TColor.GREEN;
        
        switch (term) {
        case 0:
            color = TColor.blue;
            break;
        case 1:
            color = TColor.red;
            break;
        case 2:
            color = TColor.green;
            break;
        case 3:
            color = TColor.yellow;
            break;
        case 4:
            color = TColor.SILVER;
            break;
        default:
            break;
        }
        return color;
    }
    
    public static int getMarkFromPos(int pos) {
        int markVal = -1;

        switch (pos) {
        case 0:
            markVal = TConst.MARK_20;
            break;
        case 1:
            markVal = TConst.MARK_19;
            break;
        case 2:
            markVal = TConst.MARK_18;
            break;
        case 3:
            markVal = TConst.MARK_17;
            break;
        case 4:
            markVal = TConst.MARK_16;
            break;
        case 5:
            markVal = TConst.MARK_15;
            break;
        case 6:
            markVal = TConst.MARK_CT;
            break;

        default:
            break;
        }
        
        return markVal;
    }
    public static int getPosFromMark(int mark) {
        int pos = -1;

        switch (mark) {
        case TConst.MARK_20:
            pos = 0;
            break;
        case TConst.MARK_19:
            pos = 1;
            break;
        case TConst.MARK_18:
            pos = 2;
            break;
        case TConst.MARK_17:
            pos = 3;
            break;
        case TConst.MARK_16:
            pos = 4;
            break;
        case TConst.MARK_15:
            pos = 5;
            break;
        case TConst.MARK_CT:
            pos = 6;
            break;

        default:
            break;
        }
        
        return pos;
    }

}

⌨️ 快捷键说明

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