diff --git a/CMakeLists.txt b/CMakeLists.txt
index 10c93e981363a76b01d2ff65b45decc93174c3e3..b387529e0c8c7de876dd82b2ed9a192869463052 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@ project(nhf C)
 
 set(CMAKE_C_STANDARD 99)
 
-add_executable(nhf main.c view.c view.h move.c move.h)
+add_executable(nhf main.c view.c view.h move.c move.h files.c files.h)
 
 target_link_libraries(nhf m)
 
diff --git a/cmake-build-debug/CMakeCache.txt b/cmake-build-debug/CMakeCache.txt
index af09f63e0f85d61e00ca1913585be5edc583b804..fe25624b2b62ddacef41038cf1b65be00b9a18c0 100644
--- a/cmake-build-debug/CMakeCache.txt
+++ b/cmake-build-debug/CMakeCache.txt
@@ -1,6 +1,6 @@
 # This is the CMakeCache file.
 # For build in directory: /home/blint/projects/nhf/cmake-build-debug
-# It was generated by CMake: /snap/clion/92/bin/cmake/linux/bin/cmake
+# It was generated by CMake: /snap/clion/97/bin/cmake/linux/bin/cmake
 # You can edit this file to change values found and used by cmake.
 # If you do not want to change any of the values, simply exit the editor.
 # If you do want to change a value, simply edit, save, and exit the editor.
@@ -239,11 +239,11 @@ CMAKE_CACHE_PATCH_VERSION:INTERNAL=3
 //ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
 CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
 //Path to CMake executable.
-CMAKE_COMMAND:INTERNAL=/snap/clion/92/bin/cmake/linux/bin/cmake
+CMAKE_COMMAND:INTERNAL=/snap/clion/97/bin/cmake/linux/bin/cmake
 //Path to cpack program executable.
-CMAKE_CPACK_COMMAND:INTERNAL=/snap/clion/92/bin/cmake/linux/bin/cpack
+CMAKE_CPACK_COMMAND:INTERNAL=/snap/clion/97/bin/cmake/linux/bin/cpack
 //Path to ctest program executable.
-CMAKE_CTEST_COMMAND:INTERNAL=/snap/clion/92/bin/cmake/linux/bin/ctest
+CMAKE_CTEST_COMMAND:INTERNAL=/snap/clion/97/bin/cmake/linux/bin/ctest
 //ADVANCED property for variable: CMAKE_C_COMPILER
 CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
 //ADVANCED property for variable: CMAKE_C_COMPILER_AR
@@ -320,7 +320,7 @@ CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
 //ADVANCED property for variable: CMAKE_RANLIB
 CMAKE_RANLIB-ADVANCED:INTERNAL=1
 //Path to CMake installation.
-CMAKE_ROOT:INTERNAL=/snap/clion/92/bin/cmake/linux/share/cmake-3.15
+CMAKE_ROOT:INTERNAL=/snap/clion/97/bin/cmake/linux/share/cmake-3.15
 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
 CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
diff --git a/cmake-build-debug/CMakeFiles/Makefile.cmake b/cmake-build-debug/CMakeFiles/Makefile.cmake
index faa55633cf9413ca001d6561781eaab78f2c3de8..d05b52fe93e37ccf50de72c2c5088903dcad7bb2 100644
--- a/cmake-build-debug/CMakeFiles/Makefile.cmake
+++ b/cmake-build-debug/CMakeFiles/Makefile.cmake
@@ -10,28 +10,28 @@ set(CMAKE_MAKEFILE_DEPENDS
   "../CMakeLists.txt"
   "CMakeFiles/3.15.3/CMakeCCompiler.cmake"
   "CMakeFiles/3.15.3/CMakeSystem.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/CMakeCInformation.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/CMakeCommonLanguageInclude.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/CMakeFindCodeBlocks.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/CMakeGenericSystem.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/CMakeInitializeConfigs.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/CMakeLanguageInformation.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/CMakeSystemSpecificInformation.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/CMakeSystemSpecificInitialize.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/Compiler/GNU-C.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/Compiler/GNU.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/FindPackageMessage.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/FindPkgConfig.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/Internal/CMakeCheckCompilerFlag.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/Platform/Linux-GNU-C.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/Platform/Linux-GNU.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/Platform/Linux.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/Platform/UnixPaths.cmake"
-  "/snap/clion/92/bin/cmake/linux/share/cmake-3.15/Modules/ProcessorCount.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/CMakeCInformation.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/CMakeCommonLanguageInclude.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/CMakeFindCodeBlocks.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/CMakeGenericSystem.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/CMakeInitializeConfigs.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/CMakeLanguageInformation.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/CMakeSystemSpecificInformation.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/CMakeSystemSpecificInitialize.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/Compiler/GNU-C.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/Compiler/GNU.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/FindPackageMessage.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/FindPkgConfig.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/Internal/CMakeCheckCompilerFlag.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/Platform/Linux-GNU-C.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/Platform/Linux-GNU.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/Platform/Linux.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/Platform/UnixPaths.cmake"
+  "/snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/ProcessorCount.cmake"
   )
 
 # The corresponding makefile is:
diff --git a/cmake-build-debug/CMakeFiles/Makefile2 b/cmake-build-debug/CMakeFiles/Makefile2
index db763b891fa8573b27c03609b0865e41f6ccbc4b..396989ea1e201d3a7cfe7ccc3c1a75d9c9937619 100644
--- a/cmake-build-debug/CMakeFiles/Makefile2
+++ b/cmake-build-debug/CMakeFiles/Makefile2
@@ -35,10 +35,10 @@ cmake_force:
 SHELL = /bin/sh
 
 # The CMake executable.
-CMAKE_COMMAND = /snap/clion/92/bin/cmake/linux/bin/cmake
+CMAKE_COMMAND = /snap/clion/97/bin/cmake/linux/bin/cmake
 
 # The command to remove a file.
-RM = /snap/clion/92/bin/cmake/linux/bin/cmake -E remove -f
+RM = /snap/clion/97/bin/cmake/linux/bin/cmake -E remove -f
 
 # Escaping for special characters.
 EQUALS = =
@@ -74,12 +74,12 @@ preinstall:
 CMakeFiles/nhf.dir/all:
 	$(MAKE) -f CMakeFiles/nhf.dir/build.make CMakeFiles/nhf.dir/depend
 	$(MAKE) -f CMakeFiles/nhf.dir/build.make CMakeFiles/nhf.dir/build
-	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/blint/projects/nhf/cmake-build-debug/CMakeFiles --progress-num=1,2,3,4 "Built target nhf"
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/blint/projects/nhf/cmake-build-debug/CMakeFiles --progress-num=1,2,3,4,5 "Built target nhf"
 .PHONY : CMakeFiles/nhf.dir/all
 
 # Build rule for subdir invocation for target.
 CMakeFiles/nhf.dir/rule: cmake_check_build_system
-	$(CMAKE_COMMAND) -E cmake_progress_start /home/blint/projects/nhf/cmake-build-debug/CMakeFiles 4
+	$(CMAKE_COMMAND) -E cmake_progress_start /home/blint/projects/nhf/cmake-build-debug/CMakeFiles 5
 	$(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/nhf.dir/all
 	$(CMAKE_COMMAND) -E cmake_progress_start /home/blint/projects/nhf/cmake-build-debug/CMakeFiles 0
 .PHONY : CMakeFiles/nhf.dir/rule
diff --git a/cmake-build-debug/CMakeFiles/clion-log.txt b/cmake-build-debug/CMakeFiles/clion-log.txt
index ace78dfd02b6b7d027c5457bc2b4cc9cd8cae3af..6c483c5d2759a38210c0b1f537ca7b38d0c6aae3 100644
--- a/cmake-build-debug/CMakeFiles/clion-log.txt
+++ b/cmake-build-debug/CMakeFiles/clion-log.txt
@@ -1,4 +1,4 @@
-/snap/clion/92/bin/cmake/linux/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /home/blint/projects/nhf
+/snap/clion/97/bin/cmake/linux/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /home/blint/projects/nhf
 -- Configuring done
 -- Generating done
 -- Build files have been written to: /home/blint/projects/nhf/cmake-build-debug
diff --git a/cmake-build-debug/CMakeFiles/nhf.dir/C.includecache b/cmake-build-debug/CMakeFiles/nhf.dir/C.includecache
index 5c45a90a9191255e321fe1de706515df452274b7..329d995b860a023992fdfbfad6eacde8584faa7f 100644
--- a/cmake-build-debug/CMakeFiles/nhf.dir/C.includecache
+++ b/cmake-build-debug/CMakeFiles/nhf.dir/C.includecache
@@ -6,647 +6,51 @@
 
 #IncludeRegexTransform: 
 
-/home/blint/projects/nhf/main.c
+/home/blint/projects/nhf/files.h
 view.h
 /home/blint/projects/nhf/view.h
-move.h
-/home/blint/projects/nhf/move.h
-time.h
+stdlib.h
+-
+stdio.h
 -
 
-/home/blint/projects/nhf/move.c
-move.h
 /home/blint/projects/nhf/move.h
 view.h
 /home/blint/projects/nhf/view.h
 
-/home/blint/projects/nhf/move.h
+/home/blint/projects/nhf/view.c
 view.h
 /home/blint/projects/nhf/view.h
-SDL.h
--
-stdbool.h
--
-math.h
--
-
-/home/blint/projects/nhf/view.h
+files.h
+/home/blint/projects/nhf/files.h
+move.h
+/home/blint/projects/nhf/move.h
 SDL2/SDL.h
 -
 SDL2/SDL_image.h
 -
 SDL2/SDL2_gfxPrimitives.h
 -
-stdlib.h
--
-stdio.h
--
 SDL2/SDL_ttf.h
 -
-stdbool.h
--
-
-/usr/include/SDL2/SDL.h
-SDL_main.h
-/usr/include/SDL2/SDL_main.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_assert.h
-/usr/include/SDL2/SDL_assert.h
-SDL_atomic.h
-/usr/include/SDL2/SDL_atomic.h
-SDL_audio.h
-/usr/include/SDL2/SDL_audio.h
-SDL_clipboard.h
-/usr/include/SDL2/SDL_clipboard.h
-SDL_cpuinfo.h
-/usr/include/SDL2/SDL_cpuinfo.h
-SDL_endian.h
-/usr/include/SDL2/SDL_endian.h
-SDL_error.h
-/usr/include/SDL2/SDL_error.h
-SDL_events.h
-/usr/include/SDL2/SDL_events.h
-SDL_filesystem.h
-/usr/include/SDL2/SDL_filesystem.h
-SDL_gamecontroller.h
-/usr/include/SDL2/SDL_gamecontroller.h
-SDL_haptic.h
-/usr/include/SDL2/SDL_haptic.h
-SDL_hints.h
-/usr/include/SDL2/SDL_hints.h
-SDL_joystick.h
-/usr/include/SDL2/SDL_joystick.h
-SDL_loadso.h
-/usr/include/SDL2/SDL_loadso.h
-SDL_log.h
-/usr/include/SDL2/SDL_log.h
-SDL_messagebox.h
-/usr/include/SDL2/SDL_messagebox.h
-SDL_mutex.h
-/usr/include/SDL2/SDL_mutex.h
-SDL_power.h
-/usr/include/SDL2/SDL_power.h
-SDL_render.h
-/usr/include/SDL2/SDL_render.h
-SDL_rwops.h
-/usr/include/SDL2/SDL_rwops.h
-SDL_sensor.h
-/usr/include/SDL2/SDL_sensor.h
-SDL_shape.h
-/usr/include/SDL2/SDL_shape.h
-SDL_system.h
-/usr/include/SDL2/SDL_system.h
-SDL_thread.h
-/usr/include/SDL2/SDL_thread.h
-SDL_timer.h
-/usr/include/SDL2/SDL_timer.h
-SDL_version.h
-/usr/include/SDL2/SDL_version.h
-SDL_video.h
-/usr/include/SDL2/SDL_video.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_assert.h
-SDL_config.h
-/usr/include/SDL2/SDL_config.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-signal.h
--
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_atomic.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_platform.h
-/usr/include/SDL2/SDL_platform.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-sys/cpuinline.h
--
-mbarrier.h
--
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_audio.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_error.h
-/usr/include/SDL2/SDL_error.h
-SDL_endian.h
-/usr/include/SDL2/SDL_endian.h
-SDL_mutex.h
-/usr/include/SDL2/SDL_mutex.h
-SDL_thread.h
-/usr/include/SDL2/SDL_thread.h
-SDL_rwops.h
-/usr/include/SDL2/SDL_rwops.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_blendmode.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_clipboard.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_config.h
-SDL_platform.h
-/usr/include/SDL2/SDL_platform.h
-
-/usr/include/SDL2/SDL_cpuinfo.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-intrin.h
--
-intrin.h
--
-altivec.h
--
-arm_neon.h
--
-armintr.h
--
-arm_neon.h
--
-armintr.h
--
-arm_neon.h
--
-mm3dnow.h
--
-immintrin.h
--
-mmintrin.h
--
-xmmintrin.h
--
-emmintrin.h
--
-pmmintrin.h
--
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_endian.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-endian.h
--
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_error.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_events.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_error.h
-/usr/include/SDL2/SDL_error.h
-SDL_video.h
-/usr/include/SDL2/SDL_video.h
-SDL_keyboard.h
-/usr/include/SDL2/SDL_keyboard.h
-SDL_mouse.h
-/usr/include/SDL2/SDL_mouse.h
-SDL_joystick.h
-/usr/include/SDL2/SDL_joystick.h
-SDL_gamecontroller.h
-/usr/include/SDL2/SDL_gamecontroller.h
-SDL_quit.h
-/usr/include/SDL2/SDL_quit.h
-SDL_gesture.h
-/usr/include/SDL2/SDL_gesture.h
-SDL_touch.h
-/usr/include/SDL2/SDL_touch.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_filesystem.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_gamecontroller.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_error.h
-/usr/include/SDL2/SDL_error.h
-SDL_rwops.h
-/usr/include/SDL2/SDL_rwops.h
-SDL_joystick.h
-/usr/include/SDL2/SDL_joystick.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_gesture.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_error.h
-/usr/include/SDL2/SDL_error.h
-SDL_video.h
-/usr/include/SDL2/SDL_video.h
-SDL_touch.h
-/usr/include/SDL2/SDL_touch.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_haptic.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_error.h
-/usr/include/SDL2/SDL_error.h
-SDL_joystick.h
-/usr/include/SDL2/SDL_joystick.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_hints.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_joystick.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_error.h
-/usr/include/SDL2/SDL_error.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_keyboard.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_error.h
-/usr/include/SDL2/SDL_error.h
-SDL_keycode.h
-/usr/include/SDL2/SDL_keycode.h
-SDL_video.h
-/usr/include/SDL2/SDL_video.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_keycode.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_scancode.h
-/usr/include/SDL2/SDL_scancode.h
-
-/usr/include/SDL2/SDL_loadso.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_error.h
-/usr/include/SDL2/SDL_error.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_log.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_main.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_messagebox.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_video.h
-/usr/include/SDL2/SDL_video.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_mouse.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_error.h
-/usr/include/SDL2/SDL_error.h
-SDL_video.h
-/usr/include/SDL2/SDL_video.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_mutex.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_error.h
-/usr/include/SDL2/SDL_error.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_pixels.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_endian.h
-/usr/include/SDL2/SDL_endian.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_platform.h
-AvailabilityMacros.h
-/usr/include/SDL2/AvailabilityMacros.h
-TargetConditionals.h
-/usr/include/SDL2/TargetConditionals.h
-winapifamily.h
--
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_power.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_quit.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_error.h
-/usr/include/SDL2/SDL_error.h
-
-/usr/include/SDL2/SDL_rect.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_error.h
-/usr/include/SDL2/SDL_error.h
-SDL_pixels.h
-/usr/include/SDL2/SDL_pixels.h
-SDL_rwops.h
-/usr/include/SDL2/SDL_rwops.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_render.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_rect.h
-/usr/include/SDL2/SDL_rect.h
-SDL_video.h
-/usr/include/SDL2/SDL_video.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_rwops.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_error.h
-/usr/include/SDL2/SDL_error.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_scancode.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-
-/usr/include/SDL2/SDL_sensor.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_error.h
-/usr/include/SDL2/SDL_error.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_shape.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_pixels.h
-/usr/include/SDL2/SDL_pixels.h
-SDL_rect.h
-/usr/include/SDL2/SDL_rect.h
-SDL_surface.h
-/usr/include/SDL2/SDL_surface.h
-SDL_video.h
-/usr/include/SDL2/SDL_video.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_stdinc.h
-SDL_config.h
-/usr/include/SDL2/SDL_config.h
-sys/types.h
--
-stdio.h
--
-stdlib.h
--
-stddef.h
--
-stdarg.h
--
 stdlib.h
 -
-malloc.h
--
-stddef.h
--
-stdarg.h
--
-memory.h
--
-string.h
--
-strings.h
--
-wchar.h
--
-inttypes.h
--
-stdint.h
--
-ctype.h
--
-math.h
--
-float.h
--
-alloca.h
+stdio.h
 -
-malloc.h
+
+/home/blint/projects/nhf/view.h
+SDL2/SDL.h
 -
-malloc.h
+SDL2/SDL_image.h
 -
-malloc.h
+SDL2/SDL2_gfxPrimitives.h
 -
 stdlib.h
 -
-sal.h
--
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_surface.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_pixels.h
-/usr/include/SDL2/SDL_pixels.h
-SDL_rect.h
-/usr/include/SDL2/SDL_rect.h
-SDL_blendmode.h
-/usr/include/SDL2/SDL_blendmode.h
-SDL_rwops.h
-/usr/include/SDL2/SDL_rwops.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_system.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_keyboard.h
-/usr/include/SDL2/SDL_keyboard.h
-SDL_render.h
-/usr/include/SDL2/SDL_render.h
-SDL_video.h
-/usr/include/SDL2/SDL_video.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_thread.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_error.h
-/usr/include/SDL2/SDL_error.h
-SDL_atomic.h
-/usr/include/SDL2/SDL_atomic.h
-SDL_mutex.h
-/usr/include/SDL2/SDL_mutex.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-process.h
+stdio.h
 -
-process.h
+SDL2/SDL_ttf.h
 -
-stdlib.h
+stdbool.h
 -
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_timer.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_error.h
-/usr/include/SDL2/SDL_error.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_touch.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_error.h
-/usr/include/SDL2/SDL_error.h
-SDL_video.h
-/usr/include/SDL2/SDL_video.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_version.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/SDL_video.h
-SDL_stdinc.h
-/usr/include/SDL2/SDL_stdinc.h
-SDL_pixels.h
-/usr/include/SDL2/SDL_pixels.h
-SDL_rect.h
-/usr/include/SDL2/SDL_rect.h
-SDL_surface.h
-/usr/include/SDL2/SDL_surface.h
-begin_code.h
-/usr/include/SDL2/begin_code.h
-close_code.h
-/usr/include/SDL2/close_code.h
-
-/usr/include/SDL2/begin_code.h
-
-/usr/include/SDL2/close_code.h
 
diff --git a/cmake-build-debug/CMakeFiles/nhf.dir/DependInfo.cmake b/cmake-build-debug/CMakeFiles/nhf.dir/DependInfo.cmake
index 0b1ac2a4a2db44c73303bc184392ed5bc95b57a4..4b1666a1ae0d50bb2b2395859524c6e05929e5b6 100644
--- a/cmake-build-debug/CMakeFiles/nhf.dir/DependInfo.cmake
+++ b/cmake-build-debug/CMakeFiles/nhf.dir/DependInfo.cmake
@@ -4,6 +4,7 @@ set(CMAKE_DEPENDS_LANGUAGES
   )
 # The set of files for implicit dependencies of each language:
 set(CMAKE_DEPENDS_CHECK_C
+  "/home/blint/projects/nhf/files.c" "/home/blint/projects/nhf/cmake-build-debug/CMakeFiles/nhf.dir/files.c.o"
   "/home/blint/projects/nhf/main.c" "/home/blint/projects/nhf/cmake-build-debug/CMakeFiles/nhf.dir/main.c.o"
   "/home/blint/projects/nhf/move.c" "/home/blint/projects/nhf/cmake-build-debug/CMakeFiles/nhf.dir/move.c.o"
   "/home/blint/projects/nhf/view.c" "/home/blint/projects/nhf/cmake-build-debug/CMakeFiles/nhf.dir/view.c.o"
diff --git a/cmake-build-debug/CMakeFiles/nhf.dir/build.make b/cmake-build-debug/CMakeFiles/nhf.dir/build.make
index 3cd4592f010cd97850602b79fb19d2ad356f8834..b92a10ff6b4a1926f4d9422aaa0b0038d3199eeb 100644
--- a/cmake-build-debug/CMakeFiles/nhf.dir/build.make
+++ b/cmake-build-debug/CMakeFiles/nhf.dir/build.make
@@ -34,10 +34,10 @@ cmake_force:
 SHELL = /bin/sh
 
 # The CMake executable.
-CMAKE_COMMAND = /snap/clion/92/bin/cmake/linux/bin/cmake
+CMAKE_COMMAND = /snap/clion/97/bin/cmake/linux/bin/cmake
 
 # The command to remove a file.
-RM = /snap/clion/92/bin/cmake/linux/bin/cmake -E remove -f
+RM = /snap/clion/97/bin/cmake/linux/bin/cmake -E remove -f
 
 # Escaping for special characters.
 EQUALS = =
@@ -96,11 +96,25 @@ CMakeFiles/nhf.dir/move.c.s: cmake_force
 	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/nhf.dir/move.c.s"
 	/usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/blint/projects/nhf/move.c -o CMakeFiles/nhf.dir/move.c.s
 
+CMakeFiles/nhf.dir/files.c.o: CMakeFiles/nhf.dir/flags.make
+CMakeFiles/nhf.dir/files.c.o: ../files.c
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/blint/projects/nhf/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Building C object CMakeFiles/nhf.dir/files.c.o"
+	/usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/nhf.dir/files.c.o   -c /home/blint/projects/nhf/files.c
+
+CMakeFiles/nhf.dir/files.c.i: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/nhf.dir/files.c.i"
+	/usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/blint/projects/nhf/files.c > CMakeFiles/nhf.dir/files.c.i
+
+CMakeFiles/nhf.dir/files.c.s: cmake_force
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/nhf.dir/files.c.s"
+	/usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/blint/projects/nhf/files.c -o CMakeFiles/nhf.dir/files.c.s
+
 # Object files for target nhf
 nhf_OBJECTS = \
 "CMakeFiles/nhf.dir/main.c.o" \
 "CMakeFiles/nhf.dir/view.c.o" \
-"CMakeFiles/nhf.dir/move.c.o"
+"CMakeFiles/nhf.dir/move.c.o" \
+"CMakeFiles/nhf.dir/files.c.o"
 
 # External object files for target nhf
 nhf_EXTERNAL_OBJECTS =
@@ -108,9 +122,10 @@ nhf_EXTERNAL_OBJECTS =
 nhf: CMakeFiles/nhf.dir/main.c.o
 nhf: CMakeFiles/nhf.dir/view.c.o
 nhf: CMakeFiles/nhf.dir/move.c.o
+nhf: CMakeFiles/nhf.dir/files.c.o
 nhf: CMakeFiles/nhf.dir/build.make
 nhf: CMakeFiles/nhf.dir/link.txt
-	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/blint/projects/nhf/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Linking C executable nhf"
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/blint/projects/nhf/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_5) "Linking C executable nhf"
 	$(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/nhf.dir/link.txt --verbose=$(VERBOSE)
 
 # Rule to build all files generated by this target.
diff --git a/cmake-build-debug/CMakeFiles/nhf.dir/cmake_clean.cmake b/cmake-build-debug/CMakeFiles/nhf.dir/cmake_clean.cmake
index d222ce5fad7e7d3e8da521df763f1ac9aedb208c..dfa4b4dcecccdfe2989c600865becd3721754527 100644
--- a/cmake-build-debug/CMakeFiles/nhf.dir/cmake_clean.cmake
+++ b/cmake-build-debug/CMakeFiles/nhf.dir/cmake_clean.cmake
@@ -1,4 +1,5 @@
 file(REMOVE_RECURSE
+  "CMakeFiles/nhf.dir/files.c.o"
   "CMakeFiles/nhf.dir/main.c.o"
   "CMakeFiles/nhf.dir/move.c.o"
   "CMakeFiles/nhf.dir/view.c.o"
diff --git a/cmake-build-debug/CMakeFiles/nhf.dir/depend.internal b/cmake-build-debug/CMakeFiles/nhf.dir/depend.internal
index ec51b8604162440a429faeba44c8680560c6a71f..98636268ccf5d632df23f927381d76881e099b4d 100644
--- a/cmake-build-debug/CMakeFiles/nhf.dir/depend.internal
+++ b/cmake-build-debug/CMakeFiles/nhf.dir/depend.internal
@@ -1,104 +1,22 @@
 # CMAKE generated file: DO NOT EDIT!
 # Generated by "Unix Makefiles" Generator, CMake Version 3.15
 
+CMakeFiles/nhf.dir/files.c.o
+ /home/blint/projects/nhf/files.c
+ /home/blint/projects/nhf/files.h
+ /home/blint/projects/nhf/move.h
+ /home/blint/projects/nhf/view.h
 CMakeFiles/nhf.dir/main.c.o
+ /home/blint/projects/nhf/files.h
  /home/blint/projects/nhf/main.c
  /home/blint/projects/nhf/move.h
  /home/blint/projects/nhf/view.h
- /usr/include/SDL2/SDL.h
- /usr/include/SDL2/SDL_assert.h
- /usr/include/SDL2/SDL_atomic.h
- /usr/include/SDL2/SDL_audio.h
- /usr/include/SDL2/SDL_blendmode.h
- /usr/include/SDL2/SDL_clipboard.h
- /usr/include/SDL2/SDL_config.h
- /usr/include/SDL2/SDL_cpuinfo.h
- /usr/include/SDL2/SDL_endian.h
- /usr/include/SDL2/SDL_error.h
- /usr/include/SDL2/SDL_events.h
- /usr/include/SDL2/SDL_filesystem.h
- /usr/include/SDL2/SDL_gamecontroller.h
- /usr/include/SDL2/SDL_gesture.h
- /usr/include/SDL2/SDL_haptic.h
- /usr/include/SDL2/SDL_hints.h
- /usr/include/SDL2/SDL_joystick.h
- /usr/include/SDL2/SDL_keyboard.h
- /usr/include/SDL2/SDL_keycode.h
- /usr/include/SDL2/SDL_loadso.h
- /usr/include/SDL2/SDL_log.h
- /usr/include/SDL2/SDL_main.h
- /usr/include/SDL2/SDL_messagebox.h
- /usr/include/SDL2/SDL_mouse.h
- /usr/include/SDL2/SDL_mutex.h
- /usr/include/SDL2/SDL_pixels.h
- /usr/include/SDL2/SDL_platform.h
- /usr/include/SDL2/SDL_power.h
- /usr/include/SDL2/SDL_quit.h
- /usr/include/SDL2/SDL_rect.h
- /usr/include/SDL2/SDL_render.h
- /usr/include/SDL2/SDL_rwops.h
- /usr/include/SDL2/SDL_scancode.h
- /usr/include/SDL2/SDL_sensor.h
- /usr/include/SDL2/SDL_shape.h
- /usr/include/SDL2/SDL_stdinc.h
- /usr/include/SDL2/SDL_surface.h
- /usr/include/SDL2/SDL_system.h
- /usr/include/SDL2/SDL_thread.h
- /usr/include/SDL2/SDL_timer.h
- /usr/include/SDL2/SDL_touch.h
- /usr/include/SDL2/SDL_version.h
- /usr/include/SDL2/SDL_video.h
- /usr/include/SDL2/begin_code.h
- /usr/include/SDL2/close_code.h
 CMakeFiles/nhf.dir/move.c.o
  /home/blint/projects/nhf/move.c
  /home/blint/projects/nhf/move.h
  /home/blint/projects/nhf/view.h
- /usr/include/SDL2/SDL.h
- /usr/include/SDL2/SDL_assert.h
- /usr/include/SDL2/SDL_atomic.h
- /usr/include/SDL2/SDL_audio.h
- /usr/include/SDL2/SDL_blendmode.h
- /usr/include/SDL2/SDL_clipboard.h
- /usr/include/SDL2/SDL_config.h
- /usr/include/SDL2/SDL_cpuinfo.h
- /usr/include/SDL2/SDL_endian.h
- /usr/include/SDL2/SDL_error.h
- /usr/include/SDL2/SDL_events.h
- /usr/include/SDL2/SDL_filesystem.h
- /usr/include/SDL2/SDL_gamecontroller.h
- /usr/include/SDL2/SDL_gesture.h
- /usr/include/SDL2/SDL_haptic.h
- /usr/include/SDL2/SDL_hints.h
- /usr/include/SDL2/SDL_joystick.h
- /usr/include/SDL2/SDL_keyboard.h
- /usr/include/SDL2/SDL_keycode.h
- /usr/include/SDL2/SDL_loadso.h
- /usr/include/SDL2/SDL_log.h
- /usr/include/SDL2/SDL_main.h
- /usr/include/SDL2/SDL_messagebox.h
- /usr/include/SDL2/SDL_mouse.h
- /usr/include/SDL2/SDL_mutex.h
- /usr/include/SDL2/SDL_pixels.h
- /usr/include/SDL2/SDL_platform.h
- /usr/include/SDL2/SDL_power.h
- /usr/include/SDL2/SDL_quit.h
- /usr/include/SDL2/SDL_rect.h
- /usr/include/SDL2/SDL_render.h
- /usr/include/SDL2/SDL_rwops.h
- /usr/include/SDL2/SDL_scancode.h
- /usr/include/SDL2/SDL_sensor.h
- /usr/include/SDL2/SDL_shape.h
- /usr/include/SDL2/SDL_stdinc.h
- /usr/include/SDL2/SDL_surface.h
- /usr/include/SDL2/SDL_system.h
- /usr/include/SDL2/SDL_thread.h
- /usr/include/SDL2/SDL_timer.h
- /usr/include/SDL2/SDL_touch.h
- /usr/include/SDL2/SDL_version.h
- /usr/include/SDL2/SDL_video.h
- /usr/include/SDL2/begin_code.h
- /usr/include/SDL2/close_code.h
 CMakeFiles/nhf.dir/view.c.o
+ /home/blint/projects/nhf/files.h
+ /home/blint/projects/nhf/move.h
  /home/blint/projects/nhf/view.c
  /home/blint/projects/nhf/view.h
diff --git a/cmake-build-debug/CMakeFiles/nhf.dir/depend.make b/cmake-build-debug/CMakeFiles/nhf.dir/depend.make
index 4abfb174b1712f5741c304bf9c35df45127a1130..f61b4035ca7062631f53b995b23385523f39060e 100644
--- a/cmake-build-debug/CMakeFiles/nhf.dir/depend.make
+++ b/cmake-build-debug/CMakeFiles/nhf.dir/depend.make
@@ -1,104 +1,22 @@
 # CMAKE generated file: DO NOT EDIT!
 # Generated by "Unix Makefiles" Generator, CMake Version 3.15
 
+CMakeFiles/nhf.dir/files.c.o: ../files.c
+CMakeFiles/nhf.dir/files.c.o: ../files.h
+CMakeFiles/nhf.dir/files.c.o: ../move.h
+CMakeFiles/nhf.dir/files.c.o: ../view.h
+
+CMakeFiles/nhf.dir/main.c.o: ../files.h
 CMakeFiles/nhf.dir/main.c.o: ../main.c
 CMakeFiles/nhf.dir/main.c.o: ../move.h
 CMakeFiles/nhf.dir/main.c.o: ../view.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_assert.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_atomic.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_audio.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_blendmode.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_clipboard.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_config.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_cpuinfo.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_endian.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_error.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_events.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_filesystem.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_gamecontroller.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_gesture.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_haptic.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_hints.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_joystick.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_keyboard.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_keycode.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_loadso.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_log.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_main.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_messagebox.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_mouse.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_mutex.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_pixels.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_platform.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_power.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_quit.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_rect.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_render.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_rwops.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_scancode.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_sensor.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_shape.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_stdinc.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_surface.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_system.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_thread.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_timer.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_touch.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_version.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/SDL_video.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/begin_code.h
-CMakeFiles/nhf.dir/main.c.o: /usr/include/SDL2/close_code.h
 
 CMakeFiles/nhf.dir/move.c.o: ../move.c
 CMakeFiles/nhf.dir/move.c.o: ../move.h
 CMakeFiles/nhf.dir/move.c.o: ../view.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_assert.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_atomic.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_audio.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_blendmode.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_clipboard.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_config.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_cpuinfo.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_endian.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_error.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_events.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_filesystem.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_gamecontroller.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_gesture.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_haptic.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_hints.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_joystick.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_keyboard.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_keycode.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_loadso.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_log.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_main.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_messagebox.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_mouse.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_mutex.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_pixels.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_platform.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_power.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_quit.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_rect.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_render.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_rwops.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_scancode.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_sensor.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_shape.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_stdinc.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_surface.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_system.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_thread.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_timer.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_touch.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_version.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/SDL_video.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/begin_code.h
-CMakeFiles/nhf.dir/move.c.o: /usr/include/SDL2/close_code.h
 
+CMakeFiles/nhf.dir/view.c.o: ../files.h
+CMakeFiles/nhf.dir/view.c.o: ../move.h
 CMakeFiles/nhf.dir/view.c.o: ../view.c
 CMakeFiles/nhf.dir/view.c.o: ../view.h
 
diff --git a/cmake-build-debug/CMakeFiles/nhf.dir/link.txt b/cmake-build-debug/CMakeFiles/nhf.dir/link.txt
index e737b810a5b92c753162bd9b8124eee4fe90278b..1b8b69f9ffeee66ea1244bc1c7811315e0bc96d3 100644
--- a/cmake-build-debug/CMakeFiles/nhf.dir/link.txt
+++ b/cmake-build-debug/CMakeFiles/nhf.dir/link.txt
@@ -1 +1 @@
-/usr/bin/cc   -I/usr/include/SDL2 -D_REENTRANT -g   CMakeFiles/nhf.dir/main.c.o CMakeFiles/nhf.dir/view.c.o CMakeFiles/nhf.dir/move.c.o  -o nhf -lm -lSDL2 -lSDL2_gfx -lSDL2 -lSDL2_ttf -lSDL2 -lSDL2_image -lSDL2 -lSDL2_gfx -lSDL2_ttf -lSDL2_image 
+/usr/bin/cc   -I/usr/include/SDL2 -D_REENTRANT -g   CMakeFiles/nhf.dir/main.c.o CMakeFiles/nhf.dir/view.c.o CMakeFiles/nhf.dir/move.c.o CMakeFiles/nhf.dir/files.c.o  -o nhf -lm -lSDL2 -lSDL2_gfx -lSDL2 -lSDL2_ttf -lSDL2 -lSDL2_image -lSDL2 -lSDL2_gfx -lSDL2_ttf -lSDL2_image 
diff --git a/cmake-build-debug/CMakeFiles/nhf.dir/main.c.o b/cmake-build-debug/CMakeFiles/nhf.dir/main.c.o
index 27c833060864e43ff88c97bb73fc1e96bdba7778..040219d1cd5d8ea4c4e61efd58d0c45bfd5039f1 100644
Binary files a/cmake-build-debug/CMakeFiles/nhf.dir/main.c.o and b/cmake-build-debug/CMakeFiles/nhf.dir/main.c.o differ
diff --git a/cmake-build-debug/CMakeFiles/nhf.dir/move.c.o b/cmake-build-debug/CMakeFiles/nhf.dir/move.c.o
index 0efd10a46875041cf023ff1bce9e03adbbf8d4be..cb6f60967113fa8cd7781e7b4879f3724494ec39 100644
Binary files a/cmake-build-debug/CMakeFiles/nhf.dir/move.c.o and b/cmake-build-debug/CMakeFiles/nhf.dir/move.c.o differ
diff --git a/cmake-build-debug/CMakeFiles/nhf.dir/progress.make b/cmake-build-debug/CMakeFiles/nhf.dir/progress.make
index a69a57e8e4ffee737b6054e9068354426a41030f..33e6bffba3730113ad4bec358b7c8a00b5a67431 100644
--- a/cmake-build-debug/CMakeFiles/nhf.dir/progress.make
+++ b/cmake-build-debug/CMakeFiles/nhf.dir/progress.make
@@ -2,4 +2,5 @@ CMAKE_PROGRESS_1 = 1
 CMAKE_PROGRESS_2 = 2
 CMAKE_PROGRESS_3 = 3
 CMAKE_PROGRESS_4 = 4
+CMAKE_PROGRESS_5 = 5
 
diff --git a/cmake-build-debug/CMakeFiles/nhf.dir/view.c.o b/cmake-build-debug/CMakeFiles/nhf.dir/view.c.o
index e544769fb6f010ddf277c8947a7d19b47c0d20c0..08dfd4323e67564fc24b9daf16f38761f6dc3906 100644
Binary files a/cmake-build-debug/CMakeFiles/nhf.dir/view.c.o and b/cmake-build-debug/CMakeFiles/nhf.dir/view.c.o differ
diff --git a/cmake-build-debug/CMakeFiles/progress.marks b/cmake-build-debug/CMakeFiles/progress.marks
index b8626c4cff2849624fb67f87cd0ad72b163671ad..7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69 100644
--- a/cmake-build-debug/CMakeFiles/progress.marks
+++ b/cmake-build-debug/CMakeFiles/progress.marks
@@ -1 +1 @@
-4
+5
diff --git a/cmake-build-debug/Makefile b/cmake-build-debug/Makefile
index 40de2d1a3a73553ac251d66a587e70088b0c48c7..ad8f32fd60900da43bca4d4963f7db78af84bb22 100644
--- a/cmake-build-debug/Makefile
+++ b/cmake-build-debug/Makefile
@@ -39,10 +39,10 @@ cmake_force:
 SHELL = /bin/sh
 
 # The CMake executable.
-CMAKE_COMMAND = /snap/clion/92/bin/cmake/linux/bin/cmake
+CMAKE_COMMAND = /snap/clion/97/bin/cmake/linux/bin/cmake
 
 # The command to remove a file.
-RM = /snap/clion/92/bin/cmake/linux/bin/cmake -E remove -f
+RM = /snap/clion/97/bin/cmake/linux/bin/cmake -E remove -f
 
 # Escaping for special characters.
 EQUALS = =
@@ -59,7 +59,7 @@ CMAKE_BINARY_DIR = /home/blint/projects/nhf/cmake-build-debug
 # Special rule for the target rebuild_cache
 rebuild_cache:
 	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
-	/snap/clion/92/bin/cmake/linux/bin/cmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
+	/snap/clion/97/bin/cmake/linux/bin/cmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
 .PHONY : rebuild_cache
 
 # Special rule for the target rebuild_cache
@@ -70,7 +70,7 @@ rebuild_cache/fast: rebuild_cache
 # Special rule for the target edit_cache
 edit_cache:
 	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
-	/snap/clion/92/bin/cmake/linux/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
+	/snap/clion/97/bin/cmake/linux/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
 .PHONY : edit_cache
 
 # Special rule for the target edit_cache
@@ -123,6 +123,33 @@ nhf/fast:
 	$(MAKE) -f CMakeFiles/nhf.dir/build.make CMakeFiles/nhf.dir/build
 .PHONY : nhf/fast
 
+files.o: files.c.o
+
+.PHONY : files.o
+
+# target to build an object file
+files.c.o:
+	$(MAKE) -f CMakeFiles/nhf.dir/build.make CMakeFiles/nhf.dir/files.c.o
+.PHONY : files.c.o
+
+files.i: files.c.i
+
+.PHONY : files.i
+
+# target to preprocess a source file
+files.c.i:
+	$(MAKE) -f CMakeFiles/nhf.dir/build.make CMakeFiles/nhf.dir/files.c.i
+.PHONY : files.c.i
+
+files.s: files.c.s
+
+.PHONY : files.s
+
+# target to generate assembly for a file
+files.c.s:
+	$(MAKE) -f CMakeFiles/nhf.dir/build.make CMakeFiles/nhf.dir/files.c.s
+.PHONY : files.c.s
+
 main.o: main.c.o
 
 .PHONY : main.o
@@ -213,6 +240,9 @@ help:
 	@echo "... rebuild_cache"
 	@echo "... nhf"
 	@echo "... edit_cache"
+	@echo "... files.o"
+	@echo "... files.i"
+	@echo "... files.s"
 	@echo "... main.o"
 	@echo "... main.i"
 	@echo "... main.s"
diff --git a/cmake-build-debug/nhf b/cmake-build-debug/nhf
index 74682070d6365ffa9927f393b41c3dc7546485cd..0747f644b7e6ad2785d4197ed3a85e5adc8cc25a 100755
Binary files a/cmake-build-debug/nhf and b/cmake-build-debug/nhf differ
diff --git a/cmake-build-debug/nhf.cbp b/cmake-build-debug/nhf.cbp
index 0f68c720f5add1fb6c2b8e5635524f258ab63430..02469daf3d20c027886e31bab66575649db04c02 100644
--- a/cmake-build-debug/nhf.cbp
+++ b/cmake-build-debug/nhf.cbp
@@ -80,6 +80,12 @@
 				</MakeCommands>
 			</Target>
 		</Build>
+		<Unit filename="/home/blint/projects/nhf/files.c">
+			<Option target="nhf"/>
+		</Unit>
+		<Unit filename="/home/blint/projects/nhf/files.h">
+			<Option target="nhf"/>
+		</Unit>
 		<Unit filename="/home/blint/projects/nhf/main.c">
 			<Option target="nhf"/>
 		</Unit>
diff --git a/files.c b/files.c
new file mode 100644
index 0000000000000000000000000000000000000000..30cd4e9526c7bf0c22d4480f3d6cddd40d78ed26
--- /dev/null
+++ b/files.c
@@ -0,0 +1,120 @@
+//
+// Created by blint on 2019. 11. 30..
+//
+
+#include "files.h"
+#include "view.h"
+#include "move.h"
+#include <stdlib.h>
+#include <stdio.h>
+
+Player *beolvas(FILE *fp, Player *lista)
+{
+
+    if (lista == NULL)
+    {
+        Player *uj = (Player *) malloc(sizeof(Player));
+        fscanf(fp, "%[^|]| %d\n", uj->name, &uj->score);
+        uj->kov = lista;
+        lista = uj;
+    }
+
+
+
+    Player *mozgo;
+    for (mozgo = lista; mozgo->kov != NULL; mozgo = mozgo->kov);
+
+    while (!feof(fp))
+    {
+        Player *uj = (Player *) malloc(sizeof(Player));
+        uj->kov = NULL;
+        fscanf(fp, "%[^|]| %d\n", uj->name, &uj->score);
+        mozgo->kov = uj;
+        mozgo = mozgo->kov;
+    }
+    return lista;
+}
+
+Player *hozzafuz(Player *lista, Player *elem){
+    elem->kov = lista;
+    return elem;
+}
+
+Player *osszefuz(Player *egyik, Player *masik){
+    if(egyik == NULL)
+        return masik;
+    Player *mozgo = egyik;
+    while (mozgo->kov != NULL)
+        mozgo = mozgo->kov;
+    mozgo->kov = masik;
+    return egyik;
+}
+
+Player *rendez(Player *lista)
+{
+    // Rekurzió vége, ha nincs lista (Hibás függvényhívás), vagy 1 elemű a lista
+    if(lista == NULL || lista->kov == NULL)
+        return lista;
+
+    // A részlisták első elemei
+    Player *kicsi = NULL, *egyenlo = NULL, *nagy = NULL;
+    Player *mozgo = lista;
+
+    while (mozgo != NULL){
+        // A vezérelemnek az első elemet használom
+        Player *temp = mozgo;
+        mozgo = mozgo->kov;
+
+        if (temp->score == lista->score){
+            egyenlo = hozzafuz(egyenlo, temp);
+        }
+        else if (temp->score < lista->score){
+            kicsi = hozzafuz(kicsi, temp);
+        }
+        else if (temp->score > lista->score){
+            nagy = hozzafuz(nagy, temp);
+        }
+    }
+
+    kicsi = rendez(kicsi);
+    nagy = rendez(nagy);
+
+    Player* rendezett = osszefuz(nagy, egyenlo);
+    rendezett = osszefuz(rendezett, kicsi);
+
+    return rendezett;
+}
+
+Player *egy_elem(char *name, int score_point)
+{
+    Player *elem = (Player *) malloc(sizeof(Player));
+    strcpy(elem->name, name);
+    elem->score = score_point;
+    elem->kov = NULL;
+    return elem;
+}
+
+void listakiir(Player *lista)
+{
+    if (lista == NULL)
+        return;
+    Player *mozgo;
+    for (mozgo = lista; mozgo != NULL; mozgo = mozgo->kov)
+    {
+        printf("%s %d\n", mozgo->name, mozgo->score);
+    }
+}
+
+Player *open_file_to_read(char *filename)
+{
+    FILE *fp;
+    Player *elem = NULL;
+
+    fp = fopen(filename, "rt");
+
+    elem = beolvas(fp, elem);
+    elem = rendez(elem);
+    listakiir(elem);
+    fclose(fp);
+    return elem;
+}
\ No newline at end of file
diff --git a/files.h b/files.h
new file mode 100644
index 0000000000000000000000000000000000000000..b67f770a23078c184e8e301a3e7caa69a2ab8ef1
--- /dev/null
+++ b/files.h
@@ -0,0 +1,15 @@
+//
+// Created by blint on 2019. 11. 30..
+//
+
+#ifndef NHF_FILES_H
+#define NHF_FILES_H
+
+#include "view.h"
+#include <stdlib.h>
+#include <stdio.h>
+
+
+Player *open_file_to_read(char *filename);
+
+#endif //NHF_FILES_H
diff --git a/main.c b/main.c
index e460ca6f93e013e8b550e6dee1cf23fb697e3ffb..645d07a00f6f395deabe7fa9aea0845c435ad458 100644
--- a/main.c
+++ b/main.c
@@ -1,5 +1,6 @@
 #include "view.h"
 #include "move.h"
+#include "files.h"
 #include <time.h>
 
 void freeing(Palyaelem *elem)
@@ -52,8 +53,8 @@ int main(int argc, char *argv[]) {
 
     start.x = W/6;
     start.y = H/9;
-    start.w = (W - W/6) - start.x;
-    start.h = (2*H/9) - start.y;
+    start.w = W - (2*W/6);
+    start.h = H/9;
     strcpy(start.title, "Kezdjük már el!");
     start.over = false;
     start.click = false;
@@ -61,8 +62,8 @@ int main(int argc, char *argv[]) {
     Button load;
     load.x = W/6;
     load.y = (2*H/9 + H/18);
-    load.w = (W - W/6) - load.x;
-    load.h = (3*H/9 + H/18) - load.y;
+    load.w = W - (2*W/6);
+    load.h = H/9;
     strcpy(load.title, "Betöltöm a korábbi pályát");
     load.over = false;
     load.click = false;
@@ -70,12 +71,21 @@ int main(int argc, char *argv[]) {
     Button scoreboard;
     scoreboard.x = W/6;
     scoreboard.y = (3*H/9 + 2*(H/18));
-    scoreboard.w = (W - W/6) - load.x;
-    scoreboard.h = (3*H/9 + H/18) - load.y;
+    scoreboard.w = W - (2*W/6);
+    scoreboard.h = H/9;
     strcpy(scoreboard.title, "Dicsőség tábla");
     scoreboard.over = false;
     scoreboard.click = false;
 
+    Button close;
+    close.x = W/6;
+    close.y = (4*H/9 + 3*(H/18));
+    close.w = W - (2*W/6);
+    close.h = H/9;
+    strcpy(close.title, "Mára ennyi volt");
+    close.over = false;
+    close.click = false;
+
     Button scoretitle;
     scoretitle.x = 0;
     scoretitle.y = 0;
@@ -86,7 +96,7 @@ int main(int argc, char *argv[]) {
     Color white = (Color){255, 255, 255};
 
 
-
+    Player *players = open_file_to_read("asd.txt");
 
     while (!quit) {
 
@@ -95,21 +105,27 @@ int main(int argc, char *argv[]) {
         SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
         SDL_RenderClear(renderer);
         palyakirajzol(platf);
-        palyakirajzol(itemke);
 
-        keywatcher(ev, bagoly, elozo_x, elozo_y,  &quit, &moving);
+        keywatcher(ev, bagoly, elozo_x, elozo_y,  &quit, &starting);
+        moving = starting;
 
         if (moving){
             move_draw(ev, bagoly, &elozo_x, &elozo_y, platf, &itemke);
             sprintf(scoretitle.title, "Score: %6d", max_score);
             draw_button(scoretitle, green, white);
+            palyakirajzol(itemke);
 
-        } else
+        } else if (!scoring)
         {
-            menu(ev, &start, &load, &scoreboard, &starting, &loading, &scoring);
+            menu(ev, &start, &load, &scoreboard, &close, &starting, &loading, &scoring, &quit);
             moving = starting;
+        } else if (scoring)
+        {
+            SDL_RenderClear(renderer);
+            draw_score_board(players);
         }
 
+
         SDL_RenderPresent(renderer);
     }
 
diff --git a/move.c b/move.c
index f68d608df0e2256f8fcf092b7ee08aceb7bc2e91..389705dc07c64f4efc5b60c3544ebbd9ea26c8db 100644
--- a/move.c
+++ b/move.c
@@ -78,15 +78,18 @@ static bool move(SDL_Event ev, int *x, const int *y)
 
 }
 
-void keywatcher(SDL_Event ev, SDL_Texture *kep, int x, int y, bool *quit, bool *moving)
+void keywatcher(SDL_Event ev, SDL_Texture *kep, int x, int y, bool *quit, bool *starting)
 {
     switch (ev.type) {
+        case SDL_KEYDOWN:
+            switch (ev.key.keysym.sym) {
+                case SDLK_ESCAPE:
+                    *quit = true;
+                    break;
+            }
+
         case SDL_KEYUP:
             switch (ev.key.keysym.sym) {
-                /*case SDLK_i:
-                    kirajzol(kep, x, y);
-                    *moving = true;
-                    break;*/
                 case SDLK_ESCAPE:
                     *quit = true;
                     break;
@@ -265,7 +268,7 @@ Button clickwatcher(SDL_Event ev, Button button)
     return button;
 }
 
-void menu(SDL_Event ev, Button *start, Button *load, Button *scoreboard, bool *moving, bool *loading, bool *scoring)
+void menu(SDL_Event ev, Button *start, Button *load, Button *scoreboard, Button  *close, bool *moving, bool *loading, bool *scoring, bool *quit)
 {
     Color red = (Color){255, 0, 0};
     Color green = (Color){0, 255, 0};
@@ -275,6 +278,7 @@ void menu(SDL_Event ev, Button *start, Button *load, Button *scoreboard, bool *m
     *start = clickwatcher(ev, *start);
     *load = clickwatcher(ev, *load);
     *scoreboard = clickwatcher(ev, *scoreboard);
+    *close = clickwatcher(ev, *close);
 
     if (start->over)
         draw_button(*start, green, white);
@@ -291,6 +295,11 @@ void menu(SDL_Event ev, Button *start, Button *load, Button *scoreboard, bool *m
     else
         draw_button(*scoreboard, red, white);
 
+    if (close->over)
+        draw_button(*close, green, white);
+    else
+        draw_button(*close, red, white);
+
 
     if (start->click)
         *moving = true;
@@ -306,4 +315,10 @@ void menu(SDL_Event ev, Button *start, Button *load, Button *scoreboard, bool *m
         *scoring = true;
     else
         *scoring = false;
+
+    if (close->click)
+        *quit = true;
+    else
+        //*quit = false;
+    {}
 }
\ No newline at end of file
diff --git a/move.h b/move.h
index 61eecc0838e6d4bdee2cab2df12769eb79a45f5c..e21c41672199c250c0963ab83d5fabb6c9164338 100644
--- a/move.h
+++ b/move.h
@@ -6,9 +6,6 @@
 #define NHF_MOVE_H
 
 #include "view.h"
-#include <SDL.h>
-#include <stdbool.h>
-#include <math.h>
 
 extern double v;
 extern double vx;
@@ -19,7 +16,7 @@ extern int max_score;
 extern int startx;
 extern int endx;
 
-void keywatcher(SDL_Event ev, SDL_Texture *kep, int x, int y, bool *quit, bool *moving);
+void keywatcher(SDL_Event ev, SDL_Texture *kep, int x, int y, bool *quit, bool *starting);
 
 void move_draw(SDL_Event ev, SDL_Texture *kep, int *x, int *y, Palyaelem *platf, Palyaelem **itemke);
 
@@ -27,6 +24,6 @@ Palyaelem *palyamozgat(Palyaelem *eleje, int x);
 
 Button clickwatcher(SDL_Event ev, Button button);
 
-void menu(SDL_Event ev, Button *start, Button *load, Button *scoreboard, bool *moving, bool *loading, bool *scoring);
+void menu(SDL_Event ev, Button *start, Button *load, Button *scoreboard, Button *close, bool *moving, bool *loading, bool *scoring, bool *quit);
 
 #endif //NHF_MOVE_H
\ No newline at end of file
diff --git a/view.c b/view.c
index f58961258aab1cca8b4f0d57320943c18ab6b740..d9f51efa1e4f152ba7e539a3ddf82872fbb1c8ad 100644
--- a/view.c
+++ b/view.c
@@ -3,6 +3,8 @@
 //
 
 #include "view.h"
+#include "files.h"
+#include "move.h"
 #include <SDL2/SDL.h>
 #include <SDL2/SDL_image.h>
 #include <SDL2/SDL2_gfxPrimitives.h>
@@ -243,4 +245,52 @@ int last_stand(Palyaelem *elem)
     Palyaelem *mozgo;
     for (mozgo = elem; mozgo->kov != NULL; mozgo = mozgo->kov);
     return mozgo->x;
+}
+
+void draw_score_board(Player *players)
+{
+    int i = 1;
+    Player *mozgo = players;
+
+    int last_y = H/9;
+
+    Button button;
+    char tmp[10+1];
+
+    Color green = (Color){0, 255, 0};
+    Color red = (Color){255, 0, 0};
+    Color white = (Color){255, 255, 255};
+
+    while (i < 5 && mozgo != NULL)
+    {
+        sprintf(tmp, "%d", mozgo->score);
+        strcpy(button.title, mozgo->name);
+        strcat(button.title, tmp);
+        button.x = W/6;
+        button.w = W - (2*W/6);
+        button.y = last_y * i + (H/18 * (i-1));
+        button.h = H/9;
+
+        draw_button(button, green, white);
+        SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
+        i++;
+        mozgo = mozgo->kov;
+    }
+
+    strcpy(button.title, "Visszamegyek, mert ez uncsi");
+    button.x = W/6;
+    button.w = W - (2*W/6);
+    button.y = last_y * i + (H/18 * (i-1));
+    button.h = H/9;
+    button.click = false;
+
+    draw_button(button, red, white);
+    SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
+
+    /*button = clickwatcher(ev, button);
+
+    if (button.click)
+        *scoring = false;
+    else
+        *scoring = true;*/
 }
\ No newline at end of file
diff --git a/view.h b/view.h
index 6ef3b0b4639e66bfcee47f0d1aeb2a0aa6a8a82e..bb1c93baedeaf49b00629617d8ba787cf431ef66 100644
--- a/view.h
+++ b/view.h
@@ -37,6 +37,12 @@ typedef struct Palyaelem{
     struct Palyaelem *kov;
 }Palyaelem;
 
+typedef struct Player{
+    char name[50+1];
+    int score;
+    struct Player *kov;
+}Player;
+
 extern int H;
 extern int W;
 extern int owl;
@@ -65,4 +71,6 @@ Palyaelem *gen_item(Palyaelem *platforms, Type type);
 
 int last_stand(Palyaelem *elem);
 
+void draw_score_board(Player *players);
+
 #endif //NHF_VIEW_H
\ No newline at end of file