bullet.cpp 367 B

12345678910111213141516171819202122232425
  1. /* This file is part of Invaders.
  2. *
  3. * Copyright (C) 2020 LCM.
  4. * You may use, distribute and modify Invaders under the terms of the
  5. * GPLv3 license, available at <https://www.gnu.org/licenses/\>.
  6. */
  7. #include "bullet.hpp"
  8. void bullet::next_pos()
  9. {
  10. switch(id){
  11. case 2:
  12. y--;
  13. break;
  14. case 8:
  15. case 64:
  16. case 128:
  17. case 512:
  18. y++;
  19. break;
  20. }
  21. }