@ -7,6 +7,7 @@
# include <filesystem>
# include <filesystem>
# include <unistd.h>
# include <unistd.h>
# include <pwd.h>
# include <pwd.h>
# include <iostream>
# include <packed/SharedResources.hpp>
# include <packed/SharedResources.hpp>
@ -25,6 +26,14 @@ uint get_update_interval(int level) {
return pow ( 0.8 - ( level - 1 ) * 0.007 , level - 1 ) * 1000 ;
return pow ( 0.8 - ( level - 1 ) * 0.007 , level - 1 ) * 1000 ;
}
}
int gcd ( int n , int m ) {
for ( int i = m < = n ? m : n ; i > 1 ; i - - ) {
if ( n % i = = 0 & & m % i = = 0 )
return i ;
}
return 1 ;
}
int main ( )
int main ( )
{
{
srand ( time ( NULL ) ) ;
srand ( time ( NULL ) ) ;
@ -90,6 +99,11 @@ int main()
std : : string highscore_string ;
std : : string highscore_string ;
highscore_file > > highscore_string ;
highscore_file > > highscore_string ;
uint highscore = std : : stoi ( highscore_string ) ;
uint highscore = std : : stoi ( highscore_string ) ;
uint point_gcd = gcd ( POINTS_1_LINE , gcd ( POINTS_2_LINES , gcd ( POINTS_3_LINES , POINTS_4_LINES ) ) ) ;
if ( highscore % point_gcd ! = 0 ) {
std : : cout < < " It seems your system is misconfigured. Please see this guide for fixing the issue: https://www.youtube.com/watch?v=dQw4w9WgXcQ " < < std : : endl ;
return 0 ;
}
uint score = 0 ;
uint score = 0 ;
uint lines = 0 ;
uint lines = 0 ;