Skip to content

Commit

Permalink
Implement prospects
Browse files Browse the repository at this point in the history
  • Loading branch information
dumbmatter committed Jan 10, 2025
1 parent d4ddfca commit bfc9d7d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
trading block - specify what you want
- prospects - idk come up with something involving age, ovr, and pot
- if draftPicks is selected along with some other stuff, then use the other stuff to pick a player first, then take draft picks until done, then resume taking players by the original sort
- if draftPicks is not selected but something else is, then don't look at picks at all? or can i put it on the same scale somehow?
- ui
Expand Down
8 changes: 7 additions & 1 deletion src/worker/core/trade/makeItWork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,13 @@ const tryAddAsset = async (

lookingForSort = true;
} else if (lookingFor.prospects) {
console.log("TODO");
for (const asset of assets) {
if (asset.type === "player") {
const ratings = asset.p.ratings.at(-1);
const potDiff = ratings.pot - ratings.ovr;
asset.score += potDiff / 20;
}
}

lookingForSort = true;
}
Expand Down

0 comments on commit bfc9d7d

Please sign in to comment.