You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BEGIN (add player)
player <- Array[dropPlayerAmount.Value]
INPUT txtPlayerName
count <- 0
filled <- False
REPEAT
IF player[count] is empty THEN
player[count].Name <- txtPlayerName
filled <- True
ENDIF
count <- count + 1
UNTIL filled = True OR count > dropPlayerAmount.Value
END
Generate a new round
BEGIN (generate new round)
roundNo <- roundNo + 1
count <- 0
findNo <- 0
found <- False
REPEAT
player[count].Opponent <- Empty
IF player[count].Opponent is empty THEN
REPEAT
IF player[findNo].Opponent is empty AND (player[findNo].Wins = player[count].Wins OR player[count].Wins = player[findNo].Wins - 1 OR player[count].Wins = player[findNo].Wins + 1) AND player[findNo].Name is not player[count].Name THEN
found <- True
player[count].Opponent = player[findNo].Name
player[findNo].Opponent = player[count].Name
ENDIF
findNo <- findNo + 1
UNTIL found = True OR findNo > dropPlayerAmount.Value
IF player[count].Opponent is empty THEN
player[count].Opponent = 'Bye'
player[count].Wins = player[count].Wins + 1
ENDIF
ENDIF
count <- count + 1
UNTIL count > dropPlayerAmount.Value
END
Write to a file/End and save a tournament
BEGIN (end and save tournament)
tournamentFileName <- 'tournament.xml'
OPEN tournamentFile
count <- 0
REPEAT
WRITE roundNo, player[count].Wins
UNTIL count > 20
CLOSE roundInfoFile
END