Refactoring score calculation logic
This commit is contained in:
@@ -28,8 +28,7 @@ export function getAllAnnouncementValues(): Announcement[] {
|
||||
/**
|
||||
* Checks if the selected announcements are a valid set of announcements.
|
||||
* E.g.: If RE_NO_NINETY is newly selected, RE also has to be selected
|
||||
* @param alreadySelected
|
||||
* @param newSelected
|
||||
* @param selectedAnnouncements The list of selected announcements
|
||||
*/
|
||||
export function checkValidity(selectedAnnouncements: Announcement[]): boolean {
|
||||
// First check all "RE" Announcements
|
||||
@@ -70,6 +69,10 @@ export function checkValidity(selectedAnnouncements: Announcement[]): boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the names of the two highest announcements from the given list, one for RE and one for CONTRA if applicable
|
||||
* @param selectedAnnouncements The list of announcements to check
|
||||
*/
|
||||
export function returnTwoHighestAnnouncements(selectedAnnouncements: Announcement[]): string {
|
||||
let finalString: string = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user