1
0
Fork 0
mirror of https://github.com/RobotechLille/cdf2018-principal synced 2024-11-15 04:46:06 +01:00
cdf2018-principal/chef/src/points.c

32 lines
368 B
C
Raw Normal View History

2018-04-30 16:15:47 +02:00
#include <stdio.h>
#include "lcd.h"
int points;
char tempLine[16];
void resetPoints()
{
points = 0;
}
int getPoints()
{
return points;
}
void showPoints()
{
sprintf(tempLine, "%d points", getPoints());
lockLCD();
gotoLCD(LCD_LINE_2);
printLCD(tempLine);
unlockLCD();
}
void addPoints(int pts)
{
points += pts;
showPoints();
}