int frame = 0; // frame counter to display game time at bottom int score[] = new int[2]; // current scores of you and of the computer int goal = 10; // total score needed to win int ennemies = 2; // number of ennemies (1 or 2) int nB = 4; // total number of balls (3 or 4), including the ring sumoBall[] B = new sumoBall[4]; // table of balls //float gr=.05; // radius of sumo fighters float f=0.20; // friction factor for slowing down the balls float mA=.05; // acceleration cap, set in main to half-width of window boolean AI=true; //* toggles AI using 'z' key boolean stop=false; //* game stopped by user boolean helpText = true; boolean focus = false; void trimABalls() {for(int i=0; i0) { // repeat process of detecting collision, advancing till that time, and computing new velocities after shock int k=-1,l=-1; // tracks shich pair of balls collide first float m=rm; // time remaining till next frame for (int i=0; i