| 
					
				 | 
			
			
				@@ -2,6 +2,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <GLFW/glfw3.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <iostream> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include <algorithm> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <chrono> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <fstream> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <cmath> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include "Game.h" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include "utils/Random.h" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -27,11 +30,29 @@ Game::Game(Keys& keys, const char* file, bool steps) : keys(keys), keyNext(keys. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 state(SPLIT) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if(file == nullptr) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Random r; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        int amount = steps ? 50 : 1000000; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        int amount = steps ? 50 : 100000; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for(int i = 0; i < amount; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             data.push_back({r.nextFloat(), r.nextFloat()}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        std::ifstream in; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        in.open(file); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(!in.good()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            std::cout << "cannot read '" << file << "'\n"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        int count; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        in >> count; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        while(in.get() != '\n'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for(int i = 0; i < count; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            float x; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            float y; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            in >> x; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            in.get(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            in >> y; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            while(!in.eof() && in.get() != '\n'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            data.push_back({x, y}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if(data.size() > 0) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -341,12 +362,15 @@ void Game::renderGroup(Renderer& renderer, const std::vector<Point>& group, uint 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 void Game::skip() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    long time = std::chrono::high_resolution_clock::now().time_since_epoch().count(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     split(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     while(merge()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         while(findLowerTangent()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         while(findUpperTangent()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         finalizeMerge(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    time = std::chrono::high_resolution_clock::now().time_since_epoch().count() - time; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    std::cout << "Took " << (time / 1000000.0) << "ms\n"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     state = END; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     hullA.clear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     hullB.clear(); 
			 |