package com.provinggrounds.match3things.game;


/*
 * Represents a game grid. Contains a rectangular grid of numbers.
 * All numbers must be positive integers greater than 0, between 1 and numObjectTypes(both inclusive)
 */
public class Grid {
    int width;
    int height;
    /*
     * Represents number of unique object types
     */
    int numObjectTypes;
    int[][] gameGrid;

    /*
     * Width and height must always be provided to Grid - should not be constructed without initializing/passing in those values
     */
    @SuppressWarnings("unused")
    private Grid() {

    }

    Grid(int width, int height, int numObjectTypes) {
	this.width = width;
	this.height = height;
	this.numObjectTypes = numObjectTypes;

	initGameGridArray();
    }

    /*
     * Creates grid, allocates storage
     */
    private void initGameGridArray() {
	gameGrid = new int[width][height];
    }

    /*
     * Initialize/fill game grid with random objects
     */
    private void fillGameGrid() {

    }
}

@@ -40,16 +40,42 @@
 .game;%0A%0A
+import java.util.Random;%0A%0A
 %0A/*%0A * R
@@ -402,16 +402,50 @@
 ameGrid;
+%0A    Random randomNumberGenerator;
 %0A%0A    /*
@@ -590,57 +590,63 @@
     
-@SuppressWarnings(%22unused%22)%0A    private Grid() %7B%0A
+private Grid() %7B%0A%09randomNumberGenerator = new Random();
 %0A   
@@ -703,16 +703,25 @@
 ypes) %7B%0A
+%09this();%0A
 %09this.wi
@@ -1063,16 +1063,209 @@
 rid() %7B%0A
+%09for( int%5B%5D gameGridRow : gameGrid ) %7B%0A%09    for(int counter = 0; counter %3C gameGridRow.length; counter++) %7B%0A%09%09gameGridRow%5Bcounter%5D = randomNumberGenerator.nextInt(numObjectTypes) + 1;%0A%09    %7D%0A%09%7D
 %0A    %7D%0A%7D

Add code to fill game grid with random numbers