// Copyright Zelle Games #include "RosterSubsystem.h" const URosterEntry* URosterSubsystem::GetEnemy(int32 ScoreAvailable) { int32 CB = 0; while(CB < 10000) { CB++; const URosterEntry* RosterEntry = EnemyRoster[FMath::RandRange(0, EnemyRoster.Num() -1)]; if(RosterEntry->DifficultyRating <= ScoreAvailable) { return RosterEntry; } } return nullptr; }