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
0d8193fc
Commit
0d8193fc
authored
Jan 04, 2018
by
dkonam
Browse files
Data | fix users
parent
00037e41
Changes
2
Hide whitespace changes
Inline
Side-by-side
Battleship/src/main/java/com/utclo23/data/module/UserMediator.java
View file @
0d8193fc
...
...
@@ -377,7 +377,9 @@ public class UserMediator {
this
.
mapConnectedUser
.
clear
();
try
{
if
(
this
.
dataFacade
.
getIhmMainFacade
()!=
null
){
this
.
dataFacade
.
getIhmMainFacade
().
refreshUserList
();
}
}
catch
(
IOException
ex
)
{
Logger
.
getLogger
(
UserMediator
.
class
.
getName
()).
log
(
Level
.
SEVERE
,
null
,
ex
);
}
...
...
Battleship/src/main/java/com/utclo23/data/structure/Game.java
View file @
0d8193fc
...
...
@@ -119,14 +119,15 @@ public abstract class Game extends SerializableEntity {
if
(
role
.
equals
(
"player"
))
{
if
(
this
.
players
.
size
()
<=
1
)
{
Player
player
=
new
Player
(
user
);
this
.
players
.
add
(
player
);
System
.
out
.
println
(
"ADD AS USER "
+
user
.
getPlayerName
());
}
}
else
if
(
this
.
getStatGame
().
isSpectator
()
&&
role
.
equals
(
"spectator"
))
{
System
.
out
.
println
(
"SPECTATOR "
+
user
.
getPlayerName
());
System
.
out
.
println
(
"
ADD AS
SPECTATOR "
+
user
.
getPlayerName
());
this
.
spectators
.
add
(
user
);
...
...
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