GUR Prettify
+- PA04_Main.c
This commit is contained in:
parent
be91ee279b
commit
000ba2fb13
1 changed files with 12 additions and 5 deletions
|
|
@ -104,7 +104,8 @@ bool fitClassRooms( CourseArrayType *courses,
|
|||
setRoomDataString(buildingString, tempClassRoom);
|
||||
if(verboseFlag)
|
||||
{
|
||||
printf("\nRecursion Level %d: Seeking a fit for %s\n", roomLevel, buildingString);
|
||||
printf("\nRecursion Level %d: Seeking a fit for %s\n",
|
||||
roomLevel, buildingString);
|
||||
}
|
||||
for(arrayIterator = 0; arrayIterator < courses->size; arrayIterator++)
|
||||
{
|
||||
|
|
@ -126,9 +127,12 @@ bool fitClassRooms( CourseArrayType *courses,
|
|||
if(verboseFlag)
|
||||
{
|
||||
printSpaces(2);
|
||||
printf("Trying Course Name: %s, Course Size: %d - Success!\n", courses->array[arrayIterator].courseName, courses->array[arrayIterator].size);
|
||||
printf("Trying Course Name: %s, Course Size: %d - Success!\n",
|
||||
courses->array[arrayIterator].courseName,
|
||||
courses->array[arrayIterator].size);
|
||||
printSpaces(6);
|
||||
printf("Course Name: %s, Course Size: %d will fit in %s\n", tempCourse.courseName, tempCourse.size, buildingString);
|
||||
printf("Course Name: %s, Course Size: %d will fit in %s\n",
|
||||
tempCourse.courseName, tempCourse.size, buildingString);
|
||||
}
|
||||
// Call and check next recursion
|
||||
if(fitClassRooms(courses, rooms, roomLevel + 1, verboseFlag))
|
||||
|
|
@ -142,13 +146,16 @@ bool fitClassRooms( CourseArrayType *courses,
|
|||
}
|
||||
if(verboseFlag)
|
||||
{
|
||||
printf(" Trying Course Name: %s, Course Size: %d - Failed!\n", courses->array[arrayIterator].courseName, courses->array[arrayIterator].size);
|
||||
printf(" Trying Course Name: %s, Course Size: %d - Failed!\n",
|
||||
courses->array[arrayIterator].courseName,
|
||||
courses->array[arrayIterator].size);
|
||||
}
|
||||
// end for loop
|
||||
}
|
||||
if(verboseFlag)
|
||||
{
|
||||
printf("\nCourse Name: %s, Course Size: %d - recursion fell back to Recursion Level %d\n", tempCourse.courseName, tempCourse.size, roomLevel - 1);
|
||||
printf("\nCourse Name: %s, Course Size: %d - recursion fell back to Recursion Level %d\n",
|
||||
tempCourse.courseName, tempCourse.size, roomLevel - 1);
|
||||
printSpaces(2);
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue