Fix to scoring logic
This commit is contained in:
		
							parent
							
								
									b52c7eec69
								
							
						
					
					
						commit
						d9e1e83d74
					
				@ -183,7 +183,7 @@ export class Matcher {
 | 
				
			|||||||
        const theirCharacterAnalyses = Matcher.generateAnalysisVariations(them);
 | 
					        const theirCharacterAnalyses = Matcher.generateAnalysisVariations(them);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        let bestScore = null;
 | 
					        let bestScore = null;
 | 
				
			||||||
        let bestScoreLevelCount = 10000;
 | 
					        let bestScoreLevelCount = -10000;
 | 
				
			||||||
        let bestReport: MatchReport;
 | 
					        let bestReport: MatchReport;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for(const yourAnalysis of yourCharacterAnalyses) {
 | 
					        for(const yourAnalysis of yourCharacterAnalyses) {
 | 
				
			||||||
@ -209,11 +209,11 @@ export class Matcher {
 | 
				
			|||||||
                        (report.score !== null)
 | 
					                        (report.score !== null)
 | 
				
			||||||
                        && (report.score >= bestScore)
 | 
					                        && (report.score >= bestScore)
 | 
				
			||||||
                        && (scoreLevelCount !== null)
 | 
					                        && (scoreLevelCount !== null)
 | 
				
			||||||
                        && (scoreLevelCount < bestScoreLevelCount)
 | 
					                        && (report.score * scoreLevelCount > bestScoreLevelCount)
 | 
				
			||||||
                    )
 | 
					                    )
 | 
				
			||||||
                ) {
 | 
					                ) {
 | 
				
			||||||
                    bestScore = report.score;
 | 
					                    bestScore = report.score;
 | 
				
			||||||
                    bestScoreLevelCount = (scoreLevelCount !== null) ? scoreLevelCount : 1000;
 | 
					                    bestScoreLevelCount = ((scoreLevelCount !== null) && (report.score !== null)) ? report.score * scoreLevelCount : -1000;
 | 
				
			||||||
                    bestReport = report;
 | 
					                    bestReport = report;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user