From b0f5e47c11552b9a4ff52ee019dee2780a51461c Mon Sep 17 00:00:00 2001 From: mattn Date: Wed, 9 Jul 2014 20:19:22 +0900 Subject: [PATCH] Refactor --- autoload/flappyvird.vim | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/autoload/flappyvird.vim b/autoload/flappyvird.vim index 79e3694..7f5a380 100644 --- a/autoload/flappyvird.vim +++ b/autoload/flappyvird.vim @@ -4,14 +4,9 @@ let s:cursor_off = 0 let s:cursor_on = 1 let s:t_ve = &t_ve -function! s:toggle_cursor(f) - let &t_ve = a:f ? s:t_ve : '' -endfunction - let s:STATE_LOOP = 1 let s:STATE_DIE = 2 -let s:STATE_GAMEOVER = 3 -let s:STATE_FINISH = 4 +let s:STATE_FINISH = 3 let s:seed = 0 function! s:srand(seed) abort @@ -23,6 +18,10 @@ function! s:rand() abort return (s:seed < 0 ? s:seed - 0x80000000 : s:seed) / 0x10000 % 0x8000 endfunction +function! s:toggle_cursor(f) + let &t_ve = a:f ? s:t_ve : '' +endfunction + function! s:stage_init() abort " open new buffer silent edit `='==FlappyVird=='`