- (save-scores new-scores hill-dir)
- (hill-add-file challenger-file (prog-name challenger-prog) hill-dir))
- (let ((loser (caar rankings)))
- (save-scores (filter (lambda (score)
- (not (or (equal? (car score) loser)
- (equal? (cadr score) loser))))
- new-scores)
- hill-dir)
- (hill-remove loser hill-dir)))))))
+ (hill-save-scores-and-rankings hill-dir new-scores rankings)
+ (hill-add hill-dir challenger-file challenger-name)
+ (hill-news-add hill-dir "Challenger '" challenger-name "' added to the hill."))
+ (let ((loser-name (caar rankings)))
+ (hill-save-scores-and-rankings hill-dir
+ (filter (lambda (score)
+ (not (or (equal? (car score) loser-name)
+ (equal? (cadr score) loser-name))))
+ new-scores)
+ (cdr rankings))
+ (hill-add hill-dir challenger-file challenger-name)
+ (hill-remove hill-dir loser-name)
+ (if (equal? loser-name challenger-name)
+ (hill-news-add hill-dir
+ "Challenger '" challenger-name
+ "' failed to best any warrior on the hill.")
+ (begin
+ (hill-news-add hill-dir
+ "Challenger '" challenger-name
+ "' defeated at least one warrior on the hill.")
+ (hill-news-add hill-dir
+ "Warrior '" loser-name
+ "' has been pushed off the hill!")))))))))