aboutsummaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
authorTeddy Wing2015-10-04 23:01:12 -0400
committerTeddy Wing2015-10-04 23:01:12 -0400
commit1cfdb9790d1cc46802153f21b09023f3e14e9697 (patch)
treed54af24bc780abd1cadb8aafe7cd90de1e4289c3 /autoload
parent7a236fe1f4459cc07b851cd065f6a1405a4ce02c (diff)
downloadvim-space-vlaze-1cfdb9790d1cc46802153f21b09023f3e14e9697.tar.bz2
game.vim: Move `redraw!` into `RenderBoard()`
We will always want to `redraw!` when we re-render the board, so call `redraw!` from inside this function. Noticed this when I was writing the missile firing code and realised that I needed to re-render the board at each step in the missile animation.
Diffstat (limited to 'autoload')
-rw-r--r--autoload/space_vlaze/game.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/autoload/space_vlaze/game.vim b/autoload/space_vlaze/game.vim
index 587b7d0..b5567f8 100644
--- a/autoload/space_vlaze/game.vim
+++ b/autoload/space_vlaze/game.vim
@@ -11,7 +11,6 @@ function! space_vlaze#game#Init()
sleep 50ms
call space_vlaze#mappings#Listen()
call space_vlaze#game#RenderBoard()
- redraw!
endwhile
endfunction
@@ -61,6 +60,8 @@ function! space_vlaze#game#RenderBoard()
let i += 1
endwhile
+
+ redraw!
endfunction