Commit 3e011626 authored by Quentin DRUAULT-AUBIN's avatar Quentin DRUAULT-AUBIN
Browse files

[Data] Fix setShip()

parent b701ba12
......@@ -150,10 +150,8 @@ public class GameMediator {
/**
* Check if the ship has the right amount of coordinates
*/
for (Ship s : player.getShips()) {
if(s.getSize() != s.getListCoord().size()){
throw new DataException("Data : ship has more coordinates than its size");
}
if(ship.getSize() != ship.getListCoord().size()){
throw new DataException("Data : ship has more coordinates than its size");
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment