Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Local::processAttack(Attack& a)
- {
- a.setResult(myBoard[a.getCoordinate()].processAttack());
- if (a.getResult() == Cell::Hit)
- {
- if (myBoard[a.getCoordinate()].getShip()->isSunk() == true)
- {
- sunkShips++;
- if (sunkShips >= fleet.size())
- {
- a.setFleetDestroyed(true);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment