Code Monkey home page Code Monkey logo

fpl-email-bot's People

Contributors

dependabot[bot] avatar f-aa avatar

Stargazers

 avatar

Forkers

helleladeklar

fpl-email-bot's Issues

There's some wonkiness around captain and vice-captain not playing

There was one GW last week where someone had both their captaincy choices not play. Obviously that was a worse captaincy choice than whatever else was picked that got 2 or something at the time. Bot should probably account for this.

On the other hand it should also account for negative scores being worse than picking two captains that both didn't play. A score of -2 is worse than 0 from non-play.

Movers and shakers section doesn't deal with shared first place

Haven't tested this but pretty sure that if two teams are tied for first place, it'll show one as the leader and one as the second place 0 points behind. If we switch to using Rank and Rank Sort like the plan is for standings table, then we don't have to do a bunch of figuring out ourselves and we can make movers and shakers know about shared first like the weekly winner does.

Fix persistence to correctly find the current directory for loading/saving gameweek.txt and standings.txt

After switching the current directory code to work in Azure, it seems to have broken running locally. Always looks for gameweek.txt in C:\ regardless of where it's running from. Not sure if this is an issue specifically with this machine.

Suggested fix would be to use the current method if useAzure is set to true, but alternate method (using System.Assembly most likely) when useAzure is false.

Tiebreakers are sorted incorrectly

                .OrderByDescending(t => t.Value.Current.DefaultIfEmpty(null).SingleOrDefault(e => e.Event == this.currentEventId - 1)?.TotalPoints ?? 0)
                .ThenByDescending(t => t.Value.Current.Sum(e => e.EventTransfers).Value);

            this.currentWeekStandings = this.fplTeams
                .OrderByDescending(t => t.Value.Current.Find(e => e.Event == this.currentEventId).TotalPoints)
                .ThenByDescending(t => t.Value.Current.Sum(e => e.EventTransfers).Value);

Transfers should be ascending not descending.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.