added side and room parameters, made some changes to the gridlogic aswell, so should work better now. some kind of bug is stopping the grid checking iteration from moving forward, index i is the same constantly.