Added 'foundEnd' and 'getValidPossibilities' to grid class

Signed-off-by: Fabio Teixeira <fabio1079@gmail.com>