flxbe / asm-space-invaders

A small, bootable game written in x86 Assembly inspired by Space Invaders
MIT License
214 stars 13 forks source link

check_game_state subroutine is not called from anywhere #14

Closed cyblue9 closed 5 years ago

cyblue9 commented 5 years ago

Hi @flxbe !

check_game_state subroutine in game.asm is not called from anywhere.

A couple of thoughts:

  1. To Delete to check_game_state subroutine in game.asm.
  2. To Call check_game_state subroutine from space-invaders.asm.

Which is better?

Best regards,

flxbe commented 5 years ago

Nice catch. I would prefer to call the check_game_state function, since the game function is already pretty verbose.

My suggestion is to rename the winner variable to game_state. The possible values would be

The check_game_state function can be renamed update_game_state and be called within game. It would update the global variable game_state. game then only has to switch on the updated game_state to possibly update the program_state. What do you think?

cyblue9 commented 5 years ago

Sorry for late reply.😓

No problem!

I will send a pull request soon.