bool allPositionsEqual(int loc) { for (int i = 0; i < location.length; i++) { if (location[i] != loc) return false; } return true; }