Update Grid.java

Fixed Grid class so it actually works properly.