diff --git a/autoload/VimGameCodeBreak/game.vim b/autoload/VimGameCodeBreak/game.vim index 56f59d0..dea1ec1 100644 --- a/autoload/VimGameCodeBreak/game.vim +++ b/autoload/VimGameCodeBreak/game.vim @@ -127,11 +127,11 @@ function! s:userInputProc(input) endfunction function! s:createNewBall() - for l:item in s:item - if l:item.active - return - endif - endfor + + if VimGameCodeBreak#game#getBallCount() > 0 + return + endif + let l:y = line('$') - 1 let l:x = s:ship.getCenter() let s:ball = VimGameCodeBreak#ball#new(s:screen, s:bounce, s:life, s:ship, s:config) diff --git a/autoload/VimGameCodeBreak/item_bomb.vim b/autoload/VimGameCodeBreak/item_bomb.vim index 60189e3..9bad921 100644 --- a/autoload/VimGameCodeBreak/item_bomb.vim +++ b/autoload/VimGameCodeBreak/item_bomb.vim @@ -17,7 +17,7 @@ function! VimGameCodeBreak#item_bomb#new(screen, bounce, life, ship, config) let l:obj = VimGameCodeBreak#abstractBall#new(a:screen, a:bounce, a:life, a:ship, a:config) let l:obj = deepcopy(obj) - let l:obj.icon = 'O' + let l:obj.icon = 'I' let l:obj.interval = 40 let l:obj.hitCount = 10 let l:obj.create = funcref('create')