Grid class for sudoku solver