Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Quentin DRUAULT-AUBIN
lo23-project
Commits
3e011626
Commit
3e011626
authored
Dec 14, 2017
by
Quentin DRUAULT-AUBIN
Browse files
[Data] Fix setShip()
parent
b701ba12
Changes
1
Hide whitespace changes
Inline
Side-by-side
Battleship/src/main/java/com/utclo23/data/module/GameMediator.java
View file @
3e011626
...
...
@@ -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"
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment