Game code now works with any grid width and height