Giter VIP home page Giter VIP logo

Comments (4)

ThomasMorgani avatar ThomasMorgani commented on August 17, 2024

This is not exactly what you're asking for but thought it may help bring you in the right direction. I have a function in php to show current quarter and game time. You could calculate current gametime then subtract... 60 - ($minutesMath * $currentQuarter).

in my scenario im doing this on a per player basis so im getting their current gsis_id, querying the most recent play from play table matching it, then returning the time column value.

function getCurrentGametime($timestring) {
$timestring = rtrim($timestring,')');
$timestring = substr($timestring, 1);
$array = explode(',', $timestring);
$quarter = $array['0'];
$hour = $array['1'] / 60;
$hour = round($hour);
$hour = 15 - $hour;
$minutes = $array['1'] % 60;
$minutes = 60 - $minutes;
if ($minutes == 60) {$minutes = 0;}
$minutes = sprintf("%02d", $minutes);
$time = $hour . ":" . $minutes;
$gametime = $quarter . ' ' . $time;

return $gametime;

}

from nflgame.

derek-adair avatar derek-adair commented on August 17, 2024

Pretty sure not, but cataloging as an enhancement cuz that seems useful. You are ENCOURAGED to dive in and submit this as a PR, and i'll get it in there.

from nflgame.

derek-adair avatar derek-adair commented on August 17, 2024

Need to sniff out if this is in the new data streams as well (#46)

from nflgame.

derek-adair avatar derek-adair commented on August 17, 2024

This is actually able to be inferred from the last play.time. I dont think its realistic to expect this library to track the actual play clock.

from nflgame.

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.