From 98c1bb4699a16c64a1c63c41cf31bc20a405496d Mon Sep 17 00:00:00 2001 From: Edith Boles Date: Mon, 25 Nov 2024 14:40:48 -0800 Subject: [PATCH] init --- output.txt | 250 ++++++++++++++++++++++++++++++++++++---------- saves/7-4.txt | 200 +++++++++++++++++++++++++++++++++++++ src/tft_crunch.cr | 68 ++++++------- 3 files changed, 434 insertions(+), 84 deletions(-) create mode 100644 saves/7-4.txt diff --git a/output.txt b/output.txt index b4e2602..8d55341 100644 --- a/output.txt +++ b/output.txt @@ -1,50 +1,200 @@ -Garen, Vander, Violet, Gangplank, Powder - 205 score -Scar, Vander, Violet, Ekko, Powder - 205 score -Garen, Vander, Violet, Ekko, Powder - 205 score -Nami, Vander, Violet, Powder, Vladimir - 204 score -Tristana, Vander, Violet, Powder, Urgot - 204 score -Garen, Vander, Violet, Powder, Urgot - 204 score -Corki, Vander, Violet, Powder, Urgot - 204 score -Garen, Vander, Violet, Powder, Sevika - 204 score -Garen, Vander, Violet, Powder, Rumble - 204 score -Tristana, Vander, Violet, Gangplank, Powder - 204 score -Smeech, Vander, Violet, Gangplank, Powder - 204 score -Scar, Vander, Violet, Gangplank, Powder - 204 score -Nami, Vander, Violet, Gangplank, Powder - 204 score -Jinx, Vander, Violet, Gangplank, Powder - 204 score -Jayce, Vander, Violet, Gangplank, Powder - 204 score -Darius, Vander, Violet, Gangplank, Powder - 204 score -Camille, Vander, Violet, Gangplank, Powder - 204 score -Amumu, Vander, Violet, Gangplank, Powder - 204 score -Vander, Violet, Zeri, Ekko, Powder - 204 score -Vander, Vi, Violet, Ekko, Powder - 204 score -Tristana, Vander, Violet, Ekko, Powder - 204 score -Smeech, Vander, Violet, Ekko, Powder - 204 score -Nami, Vander, Violet, Ekko, Powder - 204 score -Jinx, Vander, Violet, Ekko, Powder - 204 score -Draven, Vander, Violet, Ekko, Powder - 204 score -Darius, Vander, Violet, Ekko, Powder - 204 score -Camille, Vander, Violet, Ekko, Powder - 204 score -Amumu, Vander, Violet, Ekko, Powder - 204 score -Draven, Vander, Violet, Ambessa, Powder - 204 score -Darius, Vander, Violet, Ambessa, Powder - 204 score -Vander, Violet, Zyra, Powder, Vladimir - 203 score -Vander, Violet, Zoe, Powder, Vladimir - 203 score -Vander, Violet, Ziggs, Powder, Vladimir - 203 score -Vander, Vi, Violet, Powder, Vladimir - 203 score -Trundle, Vander, Violet, Powder, Vladimir - 203 score -Tristana, Vander, Violet, Powder, Vladimir - 203 score -Smeech, Vander, Violet, Powder, Vladimir - 203 score -Lux, Vander, Violet, Powder, Vladimir - 203 score -LeBlanc, Vander, Violet, Powder, Vladimir - 203 score -Jinx, Vander, Violet, Powder, Vladimir - 203 score -Garen, Vander, Violet, Powder, Vladimir - 203 score -Draven, Vander, Violet, Powder, Vladimir - 203 score -Corki, Vander, Violet, Powder, Vladimir - 203 score -Camille, Vander, Violet, Powder, Vladimir - 203 score -Vander, Violet, Ziggs, Powder, Urgot - 203 score -Trundle, Vander, Violet, Powder, Urgot - 203 score -Smeech, Vander, Violet, Powder, Urgot - 203 score -Scar, Vander, Violet, Powder, Urgot - 203 score -Nami, Vander, Violet, Powder, Urgot - 203 score -Jinx, Vander, Violet, Powder, Urgot - 203 score \ No newline at end of file +Gangplank, Nunu & Willump, Rell, Swain, Tristana, Trundle, Urgot, Zyra + Score: 10 + Traits: 10 + Traits count: Scrap 2, Form Swapper 2, Pit Fighter 2, Experiment 3, Bruiser 2, Visionary 2, Conqueror 2, Sorcerer 2, Emissary 1, Artillerist 2 +Darius, Draven, Gangplank, Nunu & Willump, Rell, Swain, Trundle, Vladimir + Score: 10 + Traits: 8 + Traits count: Conqueror 4, Watcher 2, Pit Fighter 2, Scrap 2, Form Swapper 2, Bruiser 2, Visionary 2, Sorcerer 2 +Darius, Draven, Gangplank, Nami, Rell, Swain, Vladimir, Zyra + Score: 10 + Traits: 6 + Traits count: Conqueror 4, Watcher 2, Pit Fighter 2, Form Swapper 2, Emissary 1, Sorcerer 4 +Darius, Draven, Gangplank, Nami, Nunu & Willump, Rell, Swain, Trundle + Score: 10 + Traits: 8 + Traits count: Conqueror 4, Pit Fighter 2, Scrap 2, Form Swapper 2, Emissary 1, Sorcerer 2, Bruiser 2, Visionary 2 +Darius, Draven, Gangplank, Lux, Nami, Rell, Swain, Vladimir + Score: 10 + Traits: 6 + Traits count: Conqueror 4, Watcher 2, Pit Fighter 2, Form Swapper 2, Sorcerer 4, Emissary 1 +Camille, Powder, Rell, Renata Glasc, Renni, Singed, Smeech, Trundle + Score: 10 + Traits: 6 + Traits count: Ambusher 3, Scrap 2, Sentinel 2, Visionary 2, Chem-Baron 4, Bruiser 2 +Camille, Powder, Rell, Renata Glasc, Renni, Singed, Smeech, Steb + Score: 10 + Traits: 6 + Traits count: Enforcer 2, Ambusher 3, Sentinel 2, Visionary 2, Chem-Baron 4, Bruiser 2 +Camille, Nunu & Willump, Powder, Renata Glasc, Renni, Smeech, Steb, Trundle + Score: 10 + Traits: 6 + Traits count: Enforcer 2, Ambusher 3, Bruiser 4, Visionary 2, Scrap 2, Chem-Baron 3 +Camille, Loris, Powder, Renata Glasc, Renni, Singed, Smeech, Trundle + Score: 10 + Traits: 6 + Traits count: Enforcer 2, Ambusher 3, Sentinel 2, Scrap 2, Chem-Baron 4, Bruiser 2 +Camille, Loris, Nunu & Willump, Powder, Renata Glasc, Renni, Singed, Smeech + Score: 10 + Traits: 6 + Traits count: Enforcer 2, Ambusher 3, Sentinel 2, Bruiser 2, Visionary 2, Chem-Baron 4 +Camille, Gangplank, Loris, Nami, Powder, Rell, Smeech, Swain + Score: 10 + Traits: 8 + Traits count: Enforcer 2, Ambusher 3, Scrap 2, Form Swapper 2, Sentinel 2, Emissary 1, Sorcerer 2, Conqueror 2 +Camille, Draven, Gangplank, Nami, Powder, Smeech, Swain, Twisted Fate + Score: 10 + Traits: 8 + Traits count: Enforcer 2, Ambusher 3, Conqueror 2, Pit Fighter 2, Scrap 2, Form Swapper 2, Emissary 1, Sorcerer 2 +Camille, Draven, Gangplank, Nami, Powder, Smeech, Steb, Swain + Score: 10 + Traits: 8 + Traits count: Enforcer 2, Ambusher 3, Conqueror 2, Pit Fighter 2, Scrap 2, Form Swapper 2, Emissary 1, Sorcerer 2 +Camille, Draven, Gangplank, Maddie, Nami, Powder, Smeech, Swain + Score: 10 + Traits: 8 + Traits count: Enforcer 2, Ambusher 3, Conqueror 2, Pit Fighter 2, Scrap 2, Form Swapper 2, Emissary 1, Sorcerer 2 +Camille, Draven, Gangplank, Loris, Nami, Powder, Smeech, Swain + Score: 10 + Traits: 8 + Traits count: Enforcer 2, Ambusher 3, Conqueror 2, Pit Fighter 2, Scrap 2, Form Swapper 2, Emissary 1, Sorcerer 2 +Akali, Blitzcrank, Camille, Nocturne, Powder, Smeech, Twisted Fate, Ziggs + Score: 10 + Traits: 6 + Traits count: Quickstriker 3, Automata 2, Dominator 2, Enforcer 2, Ambusher 3, Scrap 2 +Powder, Rell, Renata Glasc, Renni, Singed, Smeech, Tristana, Trundle + Score: 9 + Traits: 7 + Traits count: Scrap 2, Ambusher 2, Sentinel 2, Visionary 2, Chem-Baron 4, Bruiser 2, Emissary 1 +Powder, Rell, Renata Glasc, Renni, Singed, Smeech, Swain, Trundle + Score: 9 + Traits: 7 + Traits count: Scrap 2, Ambusher 2, Conqueror 2, Sentinel 2, Visionary 2, Chem-Baron 4, Bruiser 2 +Nunu & Willump, Rell, Renata Glasc, Renni, Singed, Smeech, Tristana, Vex + Score: 9 + Traits: 5 + Traits count: Bruiser 2, Visionary 4, Sentinel 2, Chem-Baron 4, Emissary 1 +Nunu & Willump, Rell, Renata Glasc, Renni, Singed, Smeech, Swain, Vex + Score: 9 + Traits: 5 + Traits count: Bruiser 2, Visionary 4, Conqueror 2, Sentinel 2, Chem-Baron 4 +Nunu & Willump, Powder, Renata Glasc, Renni, Singed, Smeech, Steb, Trundle + Score: 9 + Traits: 5 + Traits count: Bruiser 4, Visionary 2, Scrap 2, Ambusher 2, Chem-Baron 4 +Nunu & Willump, Powder, Renata Glasc, Renni, Sett, Singed, Smeech, Trundle + Score: 9 + Traits: 5 + Traits count: Bruiser 4, Visionary 2, Scrap 2, Ambusher 2, Chem-Baron 4 +Nunu & Willump, Powder, Rell, Renata Glasc, Renni, Singed, Smeech, Vex + Score: 9 + Traits: 5 + Traits count: Bruiser 2, Visionary 4, Ambusher 2, Sentinel 2, Chem-Baron 4 +Nami, Rell, Renata Glasc, Renni, Singed, Smeech, Swain, Trundle + Score: 9 + Traits: 7 + Traits count: Emissary 1, Sorcerer 2, Conqueror 2, Sentinel 2, Visionary 2, Chem-Baron 4, Bruiser 2 +Nami, Rell, Renata Glasc, Renni, Singed, Smeech, Steb, Swain + Score: 9 + Traits: 7 + Traits count: Emissary 1, Sorcerer 2, Conqueror 2, Sentinel 2, Visionary 2, Chem-Baron 4, Bruiser 2 +Nami, Rell, Renata Glasc, Renni, Sett, Singed, Smeech, Swain + Score: 9 + Traits: 7 + Traits count: Emissary 1, Sorcerer 2, Conqueror 2, Sentinel 2, Visionary 2, Chem-Baron 4, Bruiser 2 +Nami, Powder, Rell, Renata Glasc, Renni, Singed, Smeech, Trundle + Score: 9 + Traits: 7 + Traits count: Emissary 1, Scrap 2, Ambusher 2, Sentinel 2, Visionary 2, Chem-Baron 4, Bruiser 2 +Nami, Powder, Rell, Renata Glasc, Renni, Singed, Smeech, Swain + Score: 9 + Traits: 7 + Traits count: Emissary 1, Sorcerer 2, Ambusher 2, Conqueror 2, Sentinel 2, Visionary 2, Chem-Baron 4 +Nami, Nunu & Willump, Rell, Renata Glasc, Renni, Singed, Swain, Vex + Score: 9 + Traits: 7 + Traits count: Emissary 1, Sorcerer 2, Bruiser 2, Visionary 4, Conqueror 2, Sentinel 2, Chem-Baron 3 +Nami, Nunu & Willump, Rell, Renata Glasc, Renni, Singed, Smeech, Vex + Score: 9 + Traits: 5 + Traits count: Emissary 1, Bruiser 2, Visionary 4, Sentinel 2, Chem-Baron 4 +Nami, Nunu & Willump, Rell, Renata Glasc, Renni, Singed, Smeech, Swain + Score: 9 + Traits: 7 + Traits count: Emissary 1, Sorcerer 2, Bruiser 2, Visionary 3, Conqueror 2, Sentinel 2, Chem-Baron 4 +Morgana, Nunu & Willump, Rell, Renata Glasc, Renni, Singed, Smeech, Tristana + Score: 9 + Traits: 5 + Traits count: Visionary 4, Bruiser 2, Sentinel 2, Chem-Baron 4, Emissary 1 +Morgana, Nunu & Willump, Rell, Renata Glasc, Renni, Singed, Smeech, Swain + Score: 9 + Traits: 5 + Traits count: Visionary 4, Bruiser 2, Conqueror 2, Sentinel 2, Chem-Baron 4 +Morgana, Nunu & Willump, Powder, Rell, Renata Glasc, Renni, Singed, Smeech + Score: 9 + Traits: 5 + Traits count: Visionary 4, Bruiser 2, Ambusher 2, Sentinel 2, Chem-Baron 4 +Morgana, Nami, Nunu & Willump, Rell, Renata Glasc, Renni, Singed, Swain + Score: 9 + Traits: 7 + Traits count: Visionary 4, Emissary 1, Sorcerer 2, Bruiser 2, Conqueror 2, Sentinel 2, Chem-Baron 3 +Morgana, Nami, Nunu & Willump, Rell, Renata Glasc, Renni, Singed, Smeech + Score: 9 + Traits: 5 + Traits count: Visionary 4, Emissary 1, Bruiser 2, Sentinel 2, Chem-Baron 4 +Loris, Nunu & Willump, Renata Glasc, Renni, Singed, Smeech, Steb, Trundle + Score: 9 + Traits: 5 + Traits count: Enforcer 2, Sentinel 2, Bruiser 4, Visionary 2, Chem-Baron 4 +Loris, Nunu & Willump, Renata Glasc, Renni, Sett, Singed, Smeech, Steb + Score: 9 + Traits: 5 + Traits count: Enforcer 2, Sentinel 2, Bruiser 4, Visionary 2, Chem-Baron 4 +Loris, Nunu & Willump, Rell, Steb, Swain, Tristana, Urgot, Zyra + Score: 9 + Traits: 9 + Traits count: Enforcer 2, Sentinel 2, Experiment 3, Bruiser 2, Visionary 2, Conqueror 2, Sorcerer 2, Emissary 1, Artillerist 2 +Loris, Nami, Nunu & Willump, Rell, Steb, Swain, Vladimir, Zyra + Score: 9 + Traits: 7 + Traits count: Enforcer 2, Sentinel 2, Emissary 1, Sorcerer 4, Bruiser 2, Visionary 2, Conqueror 2 +Loris, Nami, Nunu & Willump, Rell, Sett, Steb, Swain, Trundle + Score: 9 + Traits: 7 + Traits count: Enforcer 2, Sentinel 2, Emissary 1, Sorcerer 2, Bruiser 4, Visionary 2, Conqueror 2 +Loris, Nami, Nunu & Willump, Rell, Renni, Steb, Swain, Trundle + Score: 9 + Traits: 7 + Traits count: Enforcer 2, Sentinel 2, Emissary 1, Sorcerer 2, Bruiser 4, Visionary 2, Conqueror 2 +Loris, Nami, Nunu & Willump, Rell, Renni, Sett, Steb, Swain + Score: 9 + Traits: 7 + Traits count: Enforcer 2, Sentinel 2, Emissary 1, Sorcerer 2, Bruiser 4, Visionary 2, Conqueror 2 +Loris, Nami, Nunu & Willump, Rell, Renata Glasc, Steb, Swain, Vex + Score: 9 + Traits: 7 + Traits count: Enforcer 2, Sentinel 2, Emissary 1, Sorcerer 2, Bruiser 2, Visionary 4, Conqueror 2 +Loris, Morgana, Nami, Nunu & Willump, Rell, Steb, Swain, Vex + Score: 9 + Traits: 7 + Traits count: Enforcer 2, Sentinel 2, Visionary 4, Emissary 1, Sorcerer 2, Bruiser 2, Conqueror 2 +Loris, Morgana, Nami, Nunu & Willump, Rell, Renata Glasc, Steb, Swain + Score: 9 + Traits: 7 + Traits count: Enforcer 2, Sentinel 2, Visionary 4, Emissary 1, Sorcerer 2, Bruiser 2, Conqueror 2 +Loris, Maddie, Nami, Nunu & Willump, Rell, Steb, Swain, Twisted Fate + Score: 9 + Traits: 7 + Traits count: Enforcer 4, Sentinel 2, Emissary 1, Sorcerer 2, Bruiser 2, Visionary 2, Conqueror 2 +Loris, Lux, Nami, Nunu & Willump, Rell, Steb, Swain, Zyra + Score: 9 + Traits: 7 + Traits count: Enforcer 2, Sentinel 2, Sorcerer 4, Emissary 1, Bruiser 2, Visionary 2, Conqueror 2 +Loris, Lux, Nami, Nunu & Willump, Rell, Steb, Swain, Vladimir + Score: 9 + Traits: 7 + Traits count: Enforcer 2, Sentinel 2, Sorcerer 4, Emissary 1, Bruiser 2, Visionary 2, Conqueror 2 +Leona, Loris, Rell, Renata Glasc, Renni, Singed, Smeech, Steb + Score: 9 + Traits: 5 + Traits count: Sentinel 4, Enforcer 2, Visionary 2, Chem-Baron 4, Bruiser 2 \ No newline at end of file diff --git a/saves/7-4.txt b/saves/7-4.txt new file mode 100644 index 0000000..c06b48e --- /dev/null +++ b/saves/7-4.txt @@ -0,0 +1,200 @@ +Camille, Ekko, Maddie, Powder, Scar, Smeech, Zeri + Score: 15 + Traits: 5 + Traits count: Enforcer 2, Ambusher 4, Firelight 3, Scrap 2, Sniper 2 +Camille, Ekko, Garen, Powder, Scar, Smeech, Zeri + Score: 15 + Traits: 5 + Traits count: Ambusher 4, Firelight 3, Scrap 2, Emissary 1, Watcher 2 +Ambessa, Camille, Ekko, Nocturne, Powder, Smeech, Twisted Fate + Score: 15 + Traits: 5 + Traits count: Emissary 1, Quickstriker 3, Enforcer 2, Ambusher 4, Scrap 2 +Akali, Ambessa, Camille, Ekko, Powder, Smeech, Twisted Fate + Score: 15 + Traits: 5 + Traits count: Quickstriker 3, Emissary 1, Enforcer 2, Ambusher 4, Scrap 2 +Akali, Ambessa, Camille, Ekko, Nocturne, Powder, Twisted Fate + Score: 15 + Traits: 5 + Traits count: Quickstriker 4, Emissary 1, Enforcer 2, Ambusher 3, Scrap 2 +Camille, Ekko, Powder, Smeech, Tristana, Urgot, Vi + Score: 14 + Traits: 6 + Traits count: Enforcer 2, Ambusher 4, Scrap 2, Emissary 1, Artillerist 2, Pit Fighter 2 +Camille, Ekko, Powder, Smeech, Steb, Trundle, Ziggs + Score: 14 + Traits: 4 + Traits count: Enforcer 2, Ambusher 4, Scrap 4, Bruiser 2 +Camille, Ekko, Powder, Scar, Smeech, Vladimir, Zeri + Score: 14 + Traits: 4 + Traits count: Ambusher 4, Firelight 3, Scrap 2, Watcher 2 +Camille, Ekko, Powder, Scar, Smeech, Vi, Zeri + Score: 14 + Traits: 4 + Traits count: Enforcer 2, Ambusher 4, Firelight 3, Scrap 2 +Camille, Ekko, Powder, Scar, Smeech, Vander, Zeri + Score: 14 + Traits: 4 + Traits count: Ambusher 4, Firelight 3, Scrap 2, Watcher 2 +Camille, Ekko, Powder, Scar, Smeech, Twitch, Zeri + Score: 14 + Traits: 4 + Traits count: Ambusher 4, Firelight 3, Scrap 2, Sniper 2 +Camille, Ekko, Powder, Scar, Smeech, Twisted Fate, Zeri + Score: 14 + Traits: 4 + Traits count: Enforcer 2, Ambusher 4, Firelight 3, Scrap 2 +Camille, Ekko, Powder, Scar, Smeech, Tristana, Zeri + Score: 14 + Traits: 4 + Traits count: Ambusher 4, Firelight 3, Scrap 2, Emissary 1 +Camille, Ekko, Powder, Scar, Smeech, Steb, Zeri + Score: 14 + Traits: 4 + Traits count: Enforcer 2, Ambusher 4, Firelight 3, Scrap 2 +Camille, Ekko, Nami, Powder, Scar, Smeech, Zeri + Score: 14 + Traits: 4 + Traits count: Ambusher 4, Firelight 3, Scrap 2, Emissary 1 +Camille, Ekko, Nami, Powder, Scar, Smeech, Vladimir + Score: 14 + Traits: 6 + Traits count: Ambusher 4, Firelight 2, Scrap 2, Emissary 1, Sorcerer 2, Watcher 2 +Camille, Ekko, Maddie, Powder, Smeech, Tristana, Zeri + Score: 14 + Traits: 6 + Traits count: Enforcer 2, Ambusher 4, Firelight 2, Scrap 2, Sniper 2, Emissary 1 +Camille, Ekko, Maddie, Nami, Powder, Smeech, Zeri + Score: 14 + Traits: 6 + Traits count: Enforcer 2, Ambusher 4, Firelight 2, Scrap 2, Sniper 2, Emissary 1 +Camille, Ekko, Loris, Powder, Scar, Smeech, Zeri + Score: 14 + Traits: 4 + Traits count: Enforcer 2, Ambusher 4, Firelight 3, Scrap 2 +Camille, Ekko, Kog'Maw, Powder, Scar, Smeech, Zeri + Score: 14 + Traits: 4 + Traits count: Ambusher 4, Firelight 3, Scrap 2, Sniper 2 +Camille, Ekko, Garen, Powder, Scar, Smeech, Vi + Score: 14 + Traits: 6 + Traits count: Enforcer 2, Ambusher 4, Firelight 2, Scrap 2, Emissary 1, Watcher 2 +Camille, Ekko, Garen, Powder, Scar, Smeech, Twisted Fate + Score: 14 + Traits: 6 + Traits count: Enforcer 2, Ambusher 4, Firelight 2, Scrap 2, Emissary 1, Watcher 2 +Camille, Ekko, Garen, Powder, Scar, Smeech, Steb + Score: 14 + Traits: 6 + Traits count: Enforcer 2, Ambusher 4, Firelight 2, Scrap 2, Emissary 1, Watcher 2 +Camille, Ekko, Garen, Maddie, Powder, Smeech, Zeri + Score: 14 + Traits: 6 + Traits count: Enforcer 2, Ambusher 4, Firelight 2, Scrap 2, Emissary 1, Sniper 2 +Camille, Ekko, Garen, Maddie, Powder, Scar, Smeech + Score: 14 + Traits: 6 + Traits count: Enforcer 2, Ambusher 4, Firelight 2, Scrap 2, Emissary 1, Watcher 2 +Camille, Ekko, Garen, Loris, Powder, Scar, Smeech + Score: 14 + Traits: 6 + Traits count: Enforcer 2, Ambusher 4, Firelight 2, Scrap 2, Emissary 1, Watcher 2 +Camille, Ekko, Gangplank, Powder, Smeech, Vi, Ziggs + Score: 14 + Traits: 4 + Traits count: Enforcer 2, Ambusher 4, Scrap 4, Pit Fighter 2 +Camille, Ekko, Gangplank, Powder, Smeech, Trundle, Vi + Score: 14 + Traits: 4 + Traits count: Enforcer 2, Ambusher 4, Scrap 4, Pit Fighter 2 +Camille, Ekko, Gangplank, Powder, Smeech, Steb, Trundle + Score: 14 + Traits: 4 + Traits count: Enforcer 2, Ambusher 4, Scrap 4, Bruiser 2 +Camille, Ekko, Elise, Gangplank, Powder, Smeech, Trundle + Score: 14 + Traits: 4 + Traits count: Ambusher 4, Scrap 4, Form Swapper 2, Bruiser 2 +Camille, Darius, Ekko, Powder, Scar, Smeech, Zeri + Score: 14 + Traits: 4 + Traits count: Ambusher 4, Watcher 2, Firelight 3, Scrap 2 +Camille, Corki, Ekko, Powder, Smeech, Tristana, Ziggs + Score: 14 + Traits: 4 + Traits count: Ambusher 4, Scrap 4, Artillerist 2, Emissary 1 +Camille, Corki, Ekko, Powder, Smeech, Tristana, Trundle + Score: 14 + Traits: 4 + Traits count: Ambusher 4, Scrap 4, Artillerist 2, Emissary 1 +Camille, Corki, Ekko, Powder, Smeech, Steb, Trundle + Score: 14 + Traits: 4 + Traits count: Enforcer 2, Ambusher 4, Scrap 4, Bruiser 2 +Camille, Corki, Ekko, Gangplank, Powder, Smeech, Vi + Score: 14 + Traits: 4 + Traits count: Enforcer 2, Ambusher 4, Scrap 4, Pit Fighter 2 +Camille, Corki, Ekko, Gangplank, Powder, Smeech, Urgot + Score: 14 + Traits: 4 + Traits count: Ambusher 4, Scrap 4, Artillerist 2, Pit Fighter 2 +Camille, Corki, Ekko, Gangplank, Powder, Smeech, Tristana + Score: 14 + Traits: 4 + Traits count: Ambusher 4, Scrap 4, Artillerist 2, Emissary 1 +Amumu, Camille, Ekko, Powder, Scar, Smeech, Zeri + Score: 14 + Traits: 4 + Traits count: Watcher 2, Ambusher 4, Firelight 3, Scrap 2 +Ambessa, Camille, Ekko, Powder, Smeech, Twisted Fate, Zeri + Score: 14 + Traits: 6 + Traits count: Emissary 1, Quickstriker 2, Enforcer 2, Ambusher 4, Firelight 2, Scrap 2 +Ambessa, Camille, Ekko, Powder, Smeech, Swain, Twisted Fate + Score: 14 + Traits: 6 + Traits count: Emissary 1, Conqueror 2, Quickstriker 2, Enforcer 2, Ambusher 4, Scrap 2 +Ambessa, Camille, Ekko, Powder, Scar, Smeech, Zeri + Score: 14 + Traits: 4 + Traits count: Emissary 1, Ambusher 4, Firelight 3, Scrap 2 +Ambessa, Camille, Ekko, Powder, Scar, Smeech, Twisted Fate + Score: 14 + Traits: 6 + Traits count: Emissary 1, Quickstriker 2, Enforcer 2, Ambusher 4, Firelight 2, Scrap 2 +Ambessa, Camille, Ekko, Powder, Rell, Smeech, Twisted Fate + Score: 14 + Traits: 6 + Traits count: Emissary 1, Conqueror 2, Quickstriker 2, Enforcer 2, Ambusher 4, Scrap 2 +Ambessa, Camille, Ekko, Maddie, Powder, Smeech, Zeri + Score: 14 + Traits: 6 + Traits count: Emissary 1, Enforcer 2, Ambusher 4, Firelight 2, Scrap 2, Sniper 2 +Ambessa, Camille, Ekko, Loris, Powder, Rell, Smeech + Score: 14 + Traits: 6 + Traits count: Emissary 1, Conqueror 2, Enforcer 2, Ambusher 4, Scrap 2, Sentinel 2 +Ambessa, Camille, Draven, Ekko, Powder, Smeech, Vi + Score: 14 + Traits: 6 + Traits count: Emissary 1, Conqueror 2, Enforcer 2, Ambusher 4, Pit Fighter 2, Scrap 2 +Ambessa, Camille, Draven, Ekko, Powder, Smeech, Twisted Fate + Score: 14 + Traits: 6 + Traits count: Emissary 1, Conqueror 2, Quickstriker 2, Enforcer 2, Ambusher 4, Scrap 2 +Ambessa, Camille, Darius, Ekko, Powder, Smeech, Twisted Fate + Score: 14 + Traits: 6 + Traits count: Emissary 1, Conqueror 2, Quickstriker 2, Enforcer 2, Ambusher 4, Scrap 2 +Ambessa, Camille, Darius, Ekko, Powder, Scar, Smeech + Score: 14 + Traits: 6 + Traits count: Emissary 1, Conqueror 2, Ambusher 4, Watcher 2, Firelight 2, Scrap 2 +Akali, Camille, Ekko, Nocturne, Powder, Smeech, Twisted Fate + Score: 14 + Traits: 4 + Traits count: Quickstriker 3, Enforcer 2, Ambusher 4, Scrap 2 \ No newline at end of file diff --git a/src/tft_crunch.cr b/src/tft_crunch.cr index 98f7f51..bd560c1 100644 --- a/src/tft_crunch.cr +++ b/src/tft_crunch.cr @@ -47,16 +47,18 @@ class Trait end def comb(n, r) - return ((n-r+1)..n).product // (1..r).product + return ((n.to_u64-r+1)..n).product // (1.to_u64..r).product end -def check_active(champions, trait_data, emblems = [] of String, uniques = false) +def check_active(champions, trait_data, uniques = false) active = [] of Tuple(Trait, Int32, Int32) count = {} of String => Int32 + emblems = [] of String champions.each do |champion| champion.traits.tally(count) end + emblems.tally(count) count.each do |trait_name, count| trait = trait_data[trait_name] if trait.active_at?(count) && (uniques || !trait.unique?) @@ -70,18 +72,21 @@ end def score_comp(champions, trait_data) traits = check_active(champions, trait_data) score = 0 - if champions.any?{|e| e.name == "Vander"} - score += 100 - end - if traits.any?{|e| e[0].name == "Family"} - score += 100 - end + # score += 100 if champions.any?{|e| e.name == "Vander"} + # if traits.any?{|e| e[0].name == "Family"} + # score += 100 + # end traits.each do |trait, count, tier| - score += 2**tier + score += 3**tier end return score end +def run_comp?(champions) + return true #champions.any?{|e| e.name == "Vander"} +end + + RES_FILE = "res/en_us.json" file = File.open(RES_FILE) @@ -95,45 +100,40 @@ champions.reject!{ |champ| champ.traits.empty? } cbn = champions.index_by(&.name) unit_count = ARGV[0]?.try(&.to_i) || 7 -super_count = ARGV[1]?.try(&.to_i) || 4 -other_count = unit_count - super_count -cost_limit = ARGV[2]?.try(&.to_i) || 10 -min_score = ARGV[3]?.try(&.to_i) || unit_count +cost_limit = ARGV[1]?.try(&.to_i) || 10 +min_score = ARGV[2]?.try(&.to_i) || unit_count champions.select!{ |champ| champ.cost <= cost_limit } champions.sort_by!{ |champ| champ.name } -super_units = champions.select{ |champ| champ.traits.size == 3 } -other_units = champions.select{ |champ| champ.traits.size == 2 } -puts "#{super_count.to_s.rjust(2)}x #{super_units.size.to_s.rjust(2)} 3-trait champions" -puts "#{other_count.to_s.rjust(2)}x #{other_units.size.to_s.rjust(2)} 2-trait champions" +puts "#{unit_count.to_s.rjust(2)}x #{champions.size.to_s.rjust(3)} champions" results = [] of Tuple(Array(Champion), Int32) counter : UInt64 = 0 -total = comb(super_units.size, super_count) -total *= comb(other_units.size, other_count) +total = comb(champions.size, unit_count) test_array1 = [] of Champion -test_array2 = [] of Champion -super_units.each_combination(super_count, reuse: test_array1) do |units| - other_units.each_combination(other_count, reuse: test_array2) do |others| - others.concat(units) - score = score_comp(others, traits) - if score >= min_score - results << {others.dup, score} - end - if counter % 100000 == 0 - percent = (counter / total * 100).format(decimal_places: 2).rjust(6) + "%" - puts "#{percent} | #{counter.to_s.rjust(10)} | #{score.to_s.rjust(3)} | #{others.map(&.name).join(", ")}" - end - counter += 1 - others.clear +champions.each_combination(unit_count, reuse: test_array1) do |units| + next unless run_comp?(units) + score = score_comp(units, traits) + if score >= min_score + results << {units.dup, score} end + if counter % 100000 == 0 + percent = (counter / total * 100).format(decimal_places: 2).rjust(6) + "%" + puts "#{percent} | #{counter.to_s.rjust(10)} | #{score.to_s.rjust(3)} | #{units.map(&.name).join(", ")}" + end + counter += 1 units.clear end output = results.sort_by{|e| e[1]}.reverse.first(50).map do |list, count| - "#{list.map(&.name).join(", ").ljust(30)} - #{count} score" + <<-HERE + #{list.map(&.name).join(", ")} + Score: #{count} + Traits: #{check_active(list, traits).size} + Traits count: #{check_active(list, traits).map{|e| "#{e[0].name} #{e[1]}"}.join(", ")} + HERE end File.write("output.txt", output.join("\n"))