var gpio = getP8Gpio();
const game = new Game({
gpio,
onNewScore(score) {
console.log('New score', { score });
},
onStart() {
console.log('Game started');
// Post to the API and create a Play in Haste and record it in the database
},
onEnd({ score }) {
console.log('Game ended', { score });
// Post to API and create Score in Haste and record it in the database
// Update the Play in the database now that it is complete
}
})