Giter Club home page Giter Club logo

Comments (5)

trevor-viljoen avatar trevor-viljoen commented on June 19, 2024 1

If I remember correctly, there is a file that gets updated with that information during the game. It may be one of the scoreboard.xml files, but I can't remember. Once spring training starts up I'll make note of it.

There is a status tag with ball, strikes, outs, and "inning_state":

<status status="Final" ind="F" reason="" inning="9" top_inning="N" b="0" s="0" o="3" inning_state="" note="" is_perfect_game="N" is_no_hitter="N"/>

from mlbgame.

ajbowler avatar ajbowler commented on June 19, 2024

This will probably require some trial and error after the season starts to see how MLB's writeouts to the XMLs work during a live game but the inning XMLs might be of some use. Assuming their innings and at-bats are always sorted we could just traverse the tree to get the latest at-bat. It has a <runner> property for every runner on base at the time.

from mlbgame.

ajbowler avatar ajbowler commented on June 19, 2024

@trevor-viljoen I'll open a separate issue for balls/strikes/outs, I'd like to keep this one open for runners on base.

from mlbgame.

ajbowler avatar ajbowler commented on June 19, 2024

It looks like game_events.xml has some atbat tags for each inning that we can get the latest from. It has b1, b2, and b3 properties that are set to the player ID of whoever is on that base, and the atbat also has the pitches that have been thrown.

The existing events module should suffice for this.

from mlbgame.

Fustrate avatar Fustrate commented on June 19, 2024

You can also use linescore.xml's runner_on_base_status value like I did here if you're not interested in who exactly is on base.

from mlbgame.

Related Issues (20)

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.