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
c34fbf09
Commit
c34fbf09
authored
Dec 16, 2017
by
Quentin DRUAULT-AUBIN
Committed by
Paul Jeannot
Dec 17, 2017
Browse files
[Data] Fix isShipTouched
parent
fcc3e32a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Battleship/src/main/java/com/utclo23/data/structure/Game.java
View file @
c34fbf09
...
...
@@ -374,7 +374,7 @@ public abstract class Game extends SerializableEntity {
List
<
Coordinate
>
coord
=
ship
.
getListCoord
()
;
boolean
shipTouched
=
false
;
for
(
Coordinate
c
:
coord
)
{
if
(
c
==
mine
.
getCoord
())
{
if
(
mine
.
getCoord
().
getX
()
==
c
.
getX
()
&&
mine
.
getCoord
().
getY
()
==
c
.
getY
())
{
shipTouched
=
true
;
return
shipTouched
;
}
...
...
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