src/GameCourt.java
// Creates 3 new random positions for food objects
Creates 3 new random positions for food objects
Creates 3 new random positions for food objects
public int[][] createFood(int a) {
        int[][] h = new int[a][2];
        RandomNumberGenerator random = new RandomNumberGenerator();
        for (int i = 0; i < a; i++) {
            int x = random.next(COURT_WIDTH - Food.SIZE);
            int y = random.next(COURT_HEIGHT - Food.SIZE);
            h[i][0] = x;
            h[i][1] = y;
        }
        return h;        
    }
public int [ ] [ ] createFood ( int a ) { int [ ] [ ] h = new int [ a ] [ 2 ] ; RandomNumberGenerator random = new RandomNumberGenerator ( ) ; for ( int i = 0 ; i < a ; i ++ ) { int x = random . next ( COURT_WIDTH - Food . SIZE ) ; int y = random . next ( COURT_HEIGHT - Food . SIZE ) ; h [ i ] [ 0 ] = x ; h [ i ] [ 1 ] = y ; } return h ; }
Creates 3 new random positions for food objects
Creates 3 new random positions for food objects