Test index limit in array before actually accessing arrays in BabyGrid.cpp.