Inspiration

Keeping track of your shots in unofficial games.

What it does

Keeps track of made and missed basketball shots, as well as total shots taken.

How I built it

We built this using the Pebble Cloud tool.

Challenges I ran into

Working at the last minute because our last project fell through.

Accomplishments that I'm proud of

We have never developed for Pebble before and we were able to get a simple app working.

What I learned

It's not as hard as we think to start learning new languages and technologies.

What's next for Ball Stats

Adding more functionality.

Here's our javascript code because we're not sure about submitting.

//simply.body('BALL IS LIFE'); var made = parseInt(localStorage.getItem('made')) || 0; made=0; var missed = parseInt(localStorage.getItem('missed')) || 0; missed=0; var total = parseInt(localStorage.getItem('total')) || 0; total=0;

simply.title('Made: \n\n'); simply.subtitle('Missed: \n\n');

simply.on('singleClick', function(e) { if (e.button === 'up') { // ++made; ++total; simply.title('Made: '+ ++made+'\n\n'); simply.body('Total: ' + made + '/' + total); } else if (e.button === 'down') { //++missed; ++total; simply.subtitle('Missed: '+ ++missed +'\n\n'); simply.body('Total: ' + made + '/' + total); }

localStorage.setItem('made', made); localStorage.setItem('missed', missed); localStorage.setItem('total', total); });

simply.on('longClick', function(e) { if(e.button==='up'){ // --made; --total; simply.title('Made: '+ --made +'\n\n'); simply.body('Total: ' + made + '/' + total); //made=made-1; } else if(e.button==='down'){ // --missed; --total; simply.subtitle('Missed: '+ --missed + '\n\n'); simply.body('Total: ' + made + '/' + total );

  }

});

Built With

Share this project:

Updates