/********************************************************************************************
ezwWorst.cpp
Jim Millard
for CO311
EZwindows sort visualization for Iterative Sort
********************************************************************************************/
#include "ezwWorst.h"
#include "ezwSwap.h"
#include "ezwUtils.h"
void SortWorst(SimpleWindow& W, RaySegment* ptrR[], int A[], const int size, const short load)
{
for (int current = 0; current < size; current++)
{
for (int target = current; target < size; target++)
if (A[target] < A[current])
{
Swap(A[target],A[current]);
Swap(W, *ptrR[target], *ptrR[current], load);
}
Highlight(*ptrR[current], Green);
}
return;
}