aboutsummaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
authorTeddy Wing2015-10-08 03:05:20 -0400
committerTeddy Wing2015-10-08 03:05:20 -0400
commit72efc690c20aa9ed05c27a75a77cd90e9cc72d77 (patch)
treede78450e983ab06a4ff0a51e9d8d9175c33e8299 /autoload
parent07c59fb8017ee35e71bf809178cbc0bdbc20cc15 (diff)
downloadvim-space-vlaze-72efc690c20aa9ed05c27a75a77cd90e9cc72d77.tar.bz2
leaderboard#RenderLeaderboard: 2 font choices (WIP)
Start of render function, initialising a new buffer for the leaderboard and getting necessary data from our storage files. Two font options generated from Figlet, one in "cybermedium" and the other in "larry3d". Going to go with the "larry3d" one.
Diffstat (limited to 'autoload')
-rw-r--r--autoload/space_vlaze/leaderboard.vim41
1 files changed, 41 insertions, 0 deletions
diff --git a/autoload/space_vlaze/leaderboard.vim b/autoload/space_vlaze/leaderboard.vim
index 5ad25dd..9136bc3 100644
--- a/autoload/space_vlaze/leaderboard.vim
+++ b/autoload/space_vlaze/leaderboard.vim
@@ -40,4 +40,45 @@ endfunction
function! space_vlaze#leaderboard#RenderLeaderboard()
+ let buffer_name = 'Space Vlaze – Leaderboard'
+
+ if !buflisted(buffer_name)
+ execute 'edit ' . escape(buffer_name, ' ')
+ else
+ execute 'b' . bufnr(buffer_name)
+ endif
+
+ let scores = []
+ let player_name = []
+
+ if filereadable(s:LEADERBOARD_PATH)
+ let scores = readfile(s:LEADERBOARD_PATH)
+ endif
+
+ if filereadable(s:PLAYER_NAME_PATH)
+ let player_name = readfile(s:PLAYER_NAME_PATH)
+ endif
+
+
+_ ____ ____ ___ ____ ____ ___ ____ ____ ____ ___
+| |___ |__| | \ |___ |__/ |__] | | |__| |__/ | \
+|___ |___ | | |__/ |___ | \ |__] |__| | | | \ |__/
+
+
+ __ __
+/\ \ /\ \
+\ \ \ __ __ \_\ \ __ _ __
+ \ \ \ __ /'__`\ /'__`\ /'_` \ /'__`\ /\`'__\
+ \ \ \L\ \/\ __/ /\ \L\.\_ /\ \L\ \ /\ __/ \ \ \/
+ \ \____/\ \____\\ \__/.\_\\ \___,_\\ \____\ \ \_\
+ \/___/ \/____/ \/__/\/_/ \/__,_ / \/____/ \/_/
+
+ __ __
+ /\ \ /\ \
+ \ \ \____ ___ __ _ __ \_\ \
+ \ \ '__`\ / __`\ /'__`\ /\`'__\ /'_` \
+ \ \ \L\ \/\ \L\ \/\ \L\.\_ \ \ \/ /\ \L\ \
+ \ \_,__/\ \____/\ \__/.\_\ \ \_\ \ \___,_\
+ \/___/ \/___/ \/__/\/_/ \/_/ \/__,_ /
+
endfunction