#6 Update move algorithm

Fix bug on grid indexes