homerchen19 / nba-go

🏀 💻 The finest NBA CLI.
https://www.npmjs.com/package/nba-go
MIT License
3.71k stars 222 forks source link

"Live" styled replay #74

Open qharlie opened 6 years ago

qharlie commented 6 years ago

Has anyone talked about implementing replays ? I searched but I couldn't find it.

homerchen19 commented 6 years ago

Hey @qorrect Could you describe more about what does "replay" look like? This may help others to implement it.

qharlie commented 6 years ago

It would look just like the live stream, with play by play, just played at a later date. I'd like to implement it but I wasn't sure if it had been talked about / if its insanely hard to do for some reason.

qharlie commented 6 years ago

I'd like to add an extra option to show a replay of a game , using the playByPlayData 'clock' element as the timer ( just delays by the number of seconds from the previous play ) . I have a working version that shows a 'sped up' replay ( max timeout of 10 seconds ) , but I'm unsure where to put the option to show a replay.

I could add a handler on the games list that when 'R/r' is pressed on an old game it shows the replay ( and enter shows the summary ) , what do you think ?