更新函数

songhaibo_branch
1 year ago
parent 683b157a09
commit 6441ef9490

@ -4,8 +4,47 @@ using namespace std;
double levelToSpeed(int level) {
double speed = 0;
if (level >= 0 && level <= 12) {
static const double table[] = { 0.0, 0.3, 1.6, 3.4, 5.5, 8.0, 10.8, 13.9, 17.2, 20.8, 24.5, 28.5, 32.6 };
speed = table[level];
double speed = 0;
switch (level) {
case 1:
speed = 0.3;
break;
case 2:
speed = 1.6;
break;
case 3:
speed = 3.4;
break;
case 4:
speed = 5.5;
break;
case 5:
speed = 8.0;
break;
case 6:
speed = 10.8;
break;
case 7:
speed = 13.9;
break;
case 8:
speed = 17.2;
break;
case 9:
speed = 20.8;
break;
case 10:
speed = 24.5;
break;
case 11:
speed = 28.5;
break;
case 12:
speed = 32.7;
break;
}
}
else if (level == 13) {
speed = 35.8;

Loading…
Cancel
Save