aboutsummaryrefslogtreecommitdiffstats
path: root/autoload/space_vlaze/life.vim
blob: 1d300bdd060954e7f54dc9671672fa061dd8108f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function! space_vlaze#life#Initialize()
	let s:lives = 3
endfunction


function! space_vlaze#life#IncrementLives()
	let s:lives += 1
endfunction


function! space_vlaze#life#DecrementLives()
	let s:lives -= 1
endfunction


function! space_vlaze#life#RenderLives()
	let lives_line = space_vlaze#game#BoardHeight() + 1
	let lives_display = ''
	
	let i = 0
	while i < s:lives
		let lives_display .= space_vlaze#player#PlayerCharacter() . ' '
		
		let i += 1
	endwhile
	
	call setline(lives_line, lives_display)
endfunction