-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
개요
- Rapidapi.com에서 특정 일자의 경기 데이터를 받아서 :
- 배당률을 토대로 재미있는(꿀잼) 경기를 판독해보는 프로그램을 작성한다.
- 배당률의 절댓값 차이를 기반으로 어느 팀이 강팀인지 확인할 수 있게 한다.
배당률
- 리버풀 vs 아스날 경기의 배당률 차이를 최소 기준선으로 잡고, 기준선이 없을 경우 100으로 설정된 기준선에 따른다.
- currentThreshold가 그 기준선이 되며, 각 경기의 배당률 차이를 diff로 설정한다. 기준선보다 작거나 같다면 그 경기는 꿀잼, 기준선보다 크다면 누가 유리한지 알려준다.
private static double threshold = -1.0;
double diff = Math.abs(homeOdds - awayOdds);
if (event.toLowerCase().contains("arsenal") && event.toLowerCase().contains("liverpool")) {
threshold = diff; // 기준선 갱신
verdict = "⚡ 기준 경기 (리버풀 vs 아스날) → 무조건 꿀잼!";
System.out.println(">>> 기준 경기 발견! threshold = " + threshold);
} else {
// ✅ 기준선 없으면 기본값 100
double currentThreshold = threshold > 0 ? threshold : 100.0;
if (diff <= currentThreshold) {
verdict = "⚡ 꿀잼 경기! 꼭 시청하세요!";
배당률의 절댓값 차이
// ✅ 절댓값이 작은 쪽이 더 유리 (American odds 규칙)
if (Math.abs(homeOdds) < Math.abs(awayOdds)) {
verdict = "🏠 " + homeTeam + " 유리한 경기";
} else if (Math.abs(awayOdds) < Math.abs(homeOdds)) {
verdict = "🚌 " + awayTeam + " 유리한 경기";
} else {
verdict = "무승부 예상";
}
프로젝트 진행 중 문제 발생 및 해결 과정은 ppt에 작성
s5646s
Metadata
Metadata
Assignees
Labels
No labels