Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Small tweaks

  • Loading branch information...
commit bf21ab2d79fe5e76bbf768c08ceab3ad43e778db 1 parent f0120e5
Mikko Lehtonen authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 main.c
View
8 main.c
@@ -40,11 +40,11 @@ void init_level() {
void finish_level() {
- float accuracy = 1 - fabs( position() - goal );
+ float accuracy = fabs( position() - goal );
if(accuracy < 0) {
failed=1;
} else {
- score+=accuracy;
+ score+=(int)(accuracy*10.0f);
}
}
@@ -98,10 +98,10 @@ void display() {
void keyboard(unsigned char key, int x, int y) {
switch(key) {
- case 27:
+ case 27:
exit(0);
break;
- case ' ':
+ case ' ':
if(!failed) finish_level();
init_level();
break;
Please sign in to comment.
Something went wrong with that request. Please try again.