thorpedosg

nQm8au5F

Aug 6th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. void Local::processAttack(Attack& a)
  2. {
  3. a.setResult(myBoard[a.getCoordinate()].processAttack());
  4. if (a.getResult() == Cell::Hit)
  5. {
  6. if (myBoard[a.getCoordinate()].getShip()->isSunk() == true)
  7. {
  8. sunkShips++;
  9. if (sunkShips >= fleet.size())
  10. {
  11. a.setFleetDestroyed(true);
  12. }
  13. }
  14. }
  15. }
Add Comment
Please, Sign In to add comment