-grids changed to one dimensional array
-added getIndex function to return 1D index from 2D coordinates
-printGrid moved to a function
-converted arrays from 2D to 1D
-added function to convert from 2D array parameters to a single
parameter for a 1D array
-moved functionality to display an array to a separate function