Skip to content

A simple example of functional approach: validation of input events

License

Notifications You must be signed in to change notification settings

Vincibean/HexadecimalMatchDecoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hexadecimal Match Decoder

Match data is streamed each time a team scores. The data contains the match time when the points were scored, an indication of which team scored and the current match score. The data is received using an hexadecimal representations. This utility:

  • parses incoming data into a data structure suitable for capturing the current state of the match
  • maintains the match state as additional data items are received.

Moreover, the provided data structure provides a way to query the match state for the following:

  • the last event (i.e. which team last scored, how many points, at what point through the match and what the resulting match score was)
  • the last n events (where 0 <= n <= Total Items)
  • all events in the match so far

Finally, this utility handles cases where an invalid event is received or where the new event is inconsistent with previous events received.

About

A simple example of functional approach: validation of input events

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages