java   台球代码

     private final int FPS = 15;                //游戏帧率
    private byte nBalls = 16;                //所有球个数   
    private Ball[] balls;                    //台球数组
    private BallPlayer[] players = new BallPlayer[2];
    private byte PLAYER_STATE;                //0为玩家一,1为玩家二 
何人是先手
    private boolean isIntoHole;                //玩家是否进球
    private byte intoID;                    //进球的ID值
    private Image imgBall[];                //桌球图片数组
    private final short maxLine = 228;        //白色球不可以当先的临界值
    private final double ball_r = 5.555555D;//球的半径 图片高的一半
    private final double rate = 0.97777777D;//速度衰减比率
    private final double minRate = 0.5D;     //速度衰减比率
    private double angle = 90;                //球杆开首角度
    private double power;                    //力度 最大值为10
    private int sL = 120;                    //球杆的长短
    private boolean allStop = true;            //所有球是否终止
    private double[] nextX; 

     private final int FPS = 15;                //游戏帧率
    private byte nBalls = 16;                //所有球个数   
    private Ball[] balls;                    //台球数组
    private BallPlayer[] players = new BallPlayer[2];
    private byte PLAYER_STATE;                //0为玩家一,1为玩家二 
何人是先手
    private boolean isIntoHole;                //玩家是否进球
    private byte intoID;                    //进球的ID值
    private Image imgBall[];                //桌球图片数组
    private final short maxLine = 228;        //白色球不可能超越的临界值
    private final double ball_r = 5.555555D;//球的半径 图片高的一半
    private final double rate = 0.97777777D;//速度衰减比率
    private final double minRate = 0.5D;     //速度衰减比率
    private double angle = 90;                //球杆伊始角度
    private double power;                    //力度 最大值为10
    private int sL = 120;                    //球杆的长度
    private boolean allStop = true;            //所有球是否终止
    private double[] nextX;