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
af3ce1b6
Commit
af3ce1b6
authored
Jan 04, 2018
by
Audrick Libraire
Browse files
Merge branch 'ihm-main/develop' into ihm-main/networkInterface2
parents
3b03a586
581ba8b8
Changes
63
Expand all
Hide whitespace changes
Inline
Side-by-side
Battleship/pom.xml
View file @
af3ce1b6
...
...
@@ -20,8 +20,37 @@
<name>
lo23
</name>
</organization>
<reporting>
<plugins>
<plugin>
<groupId>
org.codehaus.mojo
</groupId>
<artifactId>
cobertura-maven-plugin
</artifactId>
<version>
2.4
</version>
</plugin>
</plugins>
</reporting>
<build>
<plugins>
<plugin>
<groupId>
org.jacoco
</groupId>
<artifactId>
jacoco-maven-plugin
</artifactId>
<version>
0.7.0.201403182114
</version>
<executions>
<execution>
<goals>
<goal>
prepare-agent
</goal>
</goals>
</execution>
<execution>
<id>
report
</id>
<phase>
prepare-package
</phase>
<goals>
<goal>
report
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-dependency-plugin
</artifactId>
...
...
@@ -155,6 +184,13 @@
<activeByDefault>
false
</activeByDefault>
</activation>
<properties>
<sonar.exclusions>
src/main/java/com/utclo23/com/*/*.java,
src/main/java/com/utclo23/com/**/*.java,
src/main/java/com/utclo23/ihmmain/**/*.java,
src/main/java/com/utclo23/ihmtable/**/*.java
</sonar.exclusions>
<sonar.host.url>
https://sonarcloud.io
</sonar.host.url>
<sonar.organization>
lo23
</sonar.organization>
<sonar.login>
a7f86fb85267f6c368ef07d969a16ccf4be0db4b
</sonar.login>
...
...
Battleship/src/main/java/com/utclo23/battleship/GameException.java
View file @
af3ce1b6
...
...
@@ -12,9 +12,7 @@ package com.utclo23.battleship;
*/
public
class
GameException
extends
Exception
{
public
GameException
()
{
}
public
GameException
(
String
message
)
{
super
(
message
);
}
...
...
Battleship/src/main/java/com/utclo23/com/ComFacade.java
View file @
af3ce1b6
...
...
@@ -10,7 +10,6 @@ import com.utclo23.data.structure.Mine;
import
com.utclo23.data.structure.StatGame
;
import
com.utclo23.com.messages.*
;
import
com.utclo23.data.facade.IDataCom
;
import
com.utclo23.data.structure.Game
;
import
com.utclo23.data.structure.LightPublicUser
;
import
java.net.Inet4Address
;
import
java.net.InterfaceAddress
;
...
...
@@ -118,9 +117,9 @@ public class ComFacade {
*/
public
void
notifyNewCoordinates
(
Mine
mine
,
List
<
LightPublicUser
>
recipients
)
{
M_PlaceMine
mPlaceMine
=
new
M_PlaceMine
(
iDataCom
.
getMyPublicUserProfile
(),
mine
);
System
.
out
.
println
(
"recipients notify: "
+
recipients
.
size
());
System
.
out
.
println
(
"recipients
new coordinates
notify: "
+
recipients
.
size
());
for
(
LightPublicUser
recipient
:
recipients
)
{
System
.
out
.
println
(
"notifyNewCoordinates +"
+
recipient
.
getPlayerName
());
System
.
out
.
println
(
"notifyNewCoordinates +"
+
recipient
.
getPlayerName
()
+
" mine "
+
mine
.
getCoord
().
getX
()+
" "
+
mine
.
getCoord
().
getY
()
);
if
(
kIpCtrl
.
getHashMap
().
get
(
recipient
.
getId
())
!=
null
)
{
Sender
os
=
new
Sender
(
kIpCtrl
.
getHashMap
().
get
(
recipient
.
getId
()).
getHostAddress
(),
kIpCtrl
.
getPort
(),
mPlaceMine
);
new
Thread
(
os
).
start
();
...
...
@@ -159,16 +158,17 @@ public class ComFacade {
}
/**
* Called to send "leave game" notification to everybody.
* Called to send "leave game" notification to all users in the game.
* @param recipients: receivers of the notification
*/
public
void
leaveGame
()
{
public
void
leaveGame
(
List
<
LightPublicUser
>
recipients
)
{
M_LeaveGame
mLeaveGame
=
new
M_LeaveGame
(
iDataCom
.
getMyPublicUserProfile
());
for
(
Inet4Address
ip
:
kIpCtrl
.
getHashMap
().
values
())
{
if
(
ip
!=
null
)
{
Sender
os
=
new
Sender
(
ip
.
getHostAddress
(),
kIpCtrl
.
getPort
(),
mLeaveGame
);
for
(
LightPublicUser
recipient
:
recipients
)
{
if
(
kIpCtrl
.
getHashMap
().
get
(
recipient
.
getId
())
!=
null
)
{
Sender
os
=
new
Sender
(
kIpCtrl
.
getHashMap
().
get
(
recipient
.
getId
())
.
getHostAddress
(),
kIpCtrl
.
getPort
(),
mLeaveGame
);
new
Thread
(
os
).
start
();
}
}
}
}
/**
...
...
@@ -243,4 +243,20 @@ public class ComFacade {
Logger
.
getLogger
(
ComFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
"Fail joinGame"
);
}
}
/**
* Called to remove a game given in parameter in the game's list of all
* connected users
* @param idGame is the game to remove
*/
public
void
removeGame
(
String
idGame
){
M_RemoveGame
m_RemoveGame
=
new
M_RemoveGame
(
iDataCom
.
getMyPublicUserProfile
(),
idGame
);
for
(
Inet4Address
ip
:
kIpCtrl
.
getHashMap
().
values
())
{
if
(
ip
!=
null
)
{
Sender
os
=
new
Sender
(
ip
.
getHostAddress
(),
kIpCtrl
.
getPort
(),
m_RemoveGame
);
Thread
thread
=
new
Thread
(
os
);
thread
.
start
();
}
}
}
}
Battleship/src/main/java/com/utclo23/com/KnownIPController.java
View file @
af3ce1b6
...
...
@@ -9,7 +9,6 @@ import java.util.HashMap;
import
java.net.Inet4Address
;
import
com.utclo23.data.facade.IDataCom
;
import
java.net.InterfaceAddress
;
import
java.util.Iterator
;
/**
* Class containing a hashmap with UID and corresponding IP address of the known
...
...
Battleship/src/main/java/com/utclo23/com/messages/M_RemoveGame.java
0 → 100644
View file @
af3ce1b6
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
com.utclo23.com.messages
;
import
com.utclo23.data.facade.IDataCom
;
import
com.utclo23.data.structure.PublicUser
;
/**
* M_LeaveGame is a Message generated when a user wants to leave a game.
* @author Thibault CHICHE
*/
public
class
M_RemoveGame
extends
Message
{
private
final
String
idGame
;
/**
* Constructor.
* @param user is the message's sender
* @param idGame is the id of the game to remove
*/
public
M_RemoveGame
(
PublicUser
user
,
String
idGame
){
super
(
user
);
this
.
idGame
=
idGame
;
}
@Override
public
void
callback
(
IDataCom
iDataCom
){
iDataCom
.
removeGame
(
idGame
);
}
}
Battleship/src/main/java/com/utclo23/data/configuration/Configuration.java
View file @
af3ce1b6
...
...
@@ -14,15 +14,16 @@ import java.io.File;
*/
public
class
Configuration
{
public
Configuration
()
{
}
/**
* directory of saved profiles
*/
public
final
static
String
SAVE_DIR
=
System
.
getProperty
(
"user.home"
)+
File
.
separator
+
"MyData"
;
public
final
static
int
WIDTH
=
10
;
public
final
static
int
HEIGHT
=
10
;
public
static
final
String
SAVE_DIR
=
System
.
getProperty
(
"user.home"
)+
File
.
separator
+
"MyData"
;
public
static
final
int
WIDTH
=
10
;
public
static
final
int
HEIGHT
=
10
;
public
static
final
String
PLAYER
=
"player"
;
public
static
final
String
SPECTATOR
=
"spectator"
;
}
Battleship/src/main/java/com/utclo23/data/facade/DataFacade.java
View file @
af3ce1b6
...
...
@@ -24,14 +24,12 @@ import com.utclo23.data.structure.Ship;
import
com.utclo23.data.structure.StatGame
;
import
com.utclo23.ihmmain.facade.IHMMainFacade
;
import
com.utclo23.ihmtable.IHMTableFacade
;
import
com.utclo23.ihmtable.IIHMTableToData
;
import
java.io.IOException
;
import
java.io.File
;
import
java.io.IOException
;
import
java.net.InterfaceAddress
;
import
java.
net.NetworkInterface
;
import
java.
util.ArrayList
;
import
java.util.List
;
import
java.util.Date
;
...
...
@@ -79,16 +77,25 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
/**
* Set the test mode
*
* @param testMode
* @param boolean the value to set to testMode parameter
*/
public
void
setTestMode
(
boolean
testMode
)
{
this
.
testMode
=
testMode
;
}
/**
*
* @return
*/
public
IHMMainFacade
getIhmMainFacade
()
{
return
ihmMainFacade
;
}
/**
*
* @return
*/
public
IIHMTableToData
getIhmTablefacade
()
{
return
ihmTablefacade
;
}
...
...
@@ -96,7 +103,7 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
/**
* Constructor
*/
public
DataFacade
()
{
public
DataFacade
()
{
/**
* Construction of mediators by giving them a reference to this facade
*/
...
...
@@ -122,6 +129,12 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
return
comfacade
;
}
/**
*
* @param comFacade
* @param ihmTableToData
* @param ihmMainFacade
*/
public
void
setFacadeLinks
(
ComFacade
comFacade
,
IIHMTableToData
ihmTableToData
,
...
...
@@ -141,7 +154,7 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
*/
@Override
public
void
updatePlayername
(
String
playername
)
throws
DataException
{
this
.
userMediator
.
updatePlayername
(
playername
);
}
...
...
@@ -219,22 +232,23 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
}
/**
* Add new game
* Add new game
*
* @param game
* @param game
*/
@Override
public
void
addNewGame
(
StatGame
game
)
{
Logger
.
getLogger
(
this
.
getClass
().
getName
()).
log
(
Level
.
INFO
,
"Data | new game received"
);
this
.
gameMediator
.
addNewGame
(
game
);
if
(!
this
.
testMode
)
{
try
{
this
.
ihmMainFacade
.
refreshGameList
();
}
catch
(
IOException
ex
)
{
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
SEVERE
,
null
,
ex
.
getMessage
());
try
{
this
.
ihmMainFacade
.
refreshGameList
();
}
catch
(
IOException
ex
)
{
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
SEVERE
,
null
,
ex
.
getMessage
());
}
}
}
/**
...
...
@@ -246,7 +260,7 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
@Override
public
void
setEnnemyShips
(
List
<
Ship
>
ships
)
{
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
"data | set ennemy ships"
);
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
"data | set ennemy ships"
);
this
.
gameMediator
.
setEnnemyShips
(
ships
);
}
...
...
@@ -269,20 +283,22 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
*/
@Override
public
void
leaveGame
()
{
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
"data | leave game"
);
PublicUser
user
=
this
.
userMediator
.
getMyPublicUserProfile
();
this
.
comfacade
.
leaveGame
();
this
.
gameMediator
.
leaveGame
();
try
{
this
.
ihmMainFacade
.
toMenu
();
}
catch
(
IOException
ex
)
{
ex
.
printStackTrace
();
String
role
=
this
.
gameMediator
.
getOwnerStatus
();
if
(!
role
.
equals
(
"spectator"
)
&&
this
.
gameMediator
.
getCurrentGame
()
!=
null
)
{
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
"data | leave game"
);
this
.
comfacade
.
leaveGame
(
this
.
gameMediator
.
getCurrentGame
().
getRecipients
(
this
.
getMyPublicUserProfile
().
getPlayerName
()));
this
.
gameMediator
.
leaveGame
();
try
{
this
.
ihmMainFacade
.
toMenu
();
}
catch
(
IOException
ex
)
{
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
"data "
+
ex
.
getMessage
());
}
this
.
opponentHasLeftGame
();
}
else
{
this
.
ihmTablefacade
.
spectatorLeaveGame
();
}
this
.
opponentHasLeftGame
();
}
/**
...
...
@@ -290,30 +306,35 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
*/
@Override
public
void
opponentHasLeftGame
()
{
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
"data | opponent has left"
);
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
info
(
"data | opponent has left"
);
if
(!
this
.
gameMediator
.
isFinishedGame
())
{
try
{
this
.
gameMediator
.
defWin
();
}
catch
(
DataException
e
)
{
//Rien a priori.
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
"data "
+
e
.
getMessage
());
}
this
.
gameMediator
.
leaveGame
();
this
.
ihmTablefacade
.
opponentHasLeftGame
();
}
}
@Override
public
void
removeGame
(
String
id
)
{
this
.
gameMediator
.
removeGame
(
id
);
}
/**
* Notify that connection is lost
*/
@Override
public
void
connectionLostWithOpponent
()
{
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
"data | connection lost"
);
//stats.
this
.
gameMediator
.
setWinner
(
null
);
this
.
gameMediator
.
getCurrentGame
().
getStatGame
().
setGameAbandonned
(
true
);
this
.
gameMediator
.
leaveGame
();
this
.
ihmTablefacade
.
connectionLostWithOpponent
();
...
...
@@ -347,8 +368,7 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
try
{
this
.
ihmMainFacade
.
refreshUserList
();
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
// Logger.getLogger(DataFacade.class.getName()).log(Level.SEVERE, null, ex.getMessage());
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
ex
.
getMessage
());
}
}
...
...
@@ -366,8 +386,7 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
try
{
this
.
ihmMainFacade
.
refreshUserList
();
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
//Logger.getLogger(DataFacade.class.getName()).log(Level.SEVERE, null, ex.getMessage());
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
ex
.
getMessage
());
}
}
...
...
@@ -380,7 +399,7 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
@Override
public
void
forwardMessage
(
Message
msg
)
{
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
"data | forward message"
);
this
.
gameMediator
.
forwardMessage
(
msg
);
}
...
...
@@ -391,7 +410,7 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
* @return my owner profile
*/
public
Owner
getMyOwnerProfile
()
{
return
this
.
userMediator
.
getMyOwnerProfile
();
}
...
...
@@ -401,14 +420,23 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
*
* @return my public profile
*/
@Override
public
PublicUser
getMyPublicUserProfile
()
{
try
{
return
this
.
userMediator
.
getMyPublicUserProfile
();
}
catch
(
Exception
e
)
{
throw
new
UnsupportedOperationException
(
"Not supported yet."
);
//To change body of generated methods, choose Tools | Templates.
PublicUser
usr
=
this
.
userMediator
.
getMyPublicUserProfile
();
if
(
usr
!=
null
)
{
try
{
usr
.
setNumberDefeatsClassic
(
this
.
getNumberDefeatsClassic
());
usr
.
setNumberVictoriesClassic
(
this
.
getNumberVictoriesClassic
());
usr
.
setNumberAbandonsClassic
(
this
.
getNumberAbandonsClassic
());
}
catch
(
DataException
ex
)
{
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
SEVERE
,
null
,
ex
);
}
}
return
usr
;
}
/**
...
...
@@ -421,7 +449,7 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
*/
@Override
public
void
updateGameList
(
LightPublicUser
user
,
String
id
,
String
role
)
throws
DataException
{
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
"data | update game list "
+
user
.
getPlayerName
()
+
" "
+
id
+
" "
+
role
);
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
"data | update game list "
+
user
.
getPlayerName
()
+
" "
+
id
+
" "
+
role
);
this
.
gameMediator
.
updateGameList
(
user
,
id
,
role
);
}
...
...
@@ -433,8 +461,8 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
*/
@Override
public
List
<
Ship
>
getTemplateShips
()
throws
DataException
{
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
"data | get template ships"
);
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
"data | get template ships"
);
if
(
this
.
gameMediator
.
getCurrentGame
()
!=
null
)
{
return
this
.
gameMediator
.
getCurrentGame
().
getTemplateShips
();
}
else
{
...
...
@@ -450,7 +478,7 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
*/
public
void
setShip
(
Ship
ship
)
throws
DataException
{
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
"data | set ship"
);
this
.
gameMediator
.
setPlayerShip
(
ship
);
}
...
...
@@ -459,8 +487,6 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
* Attack a given location
*
* @param coords the location to attack
* @param isTrueAttack true = this is a true attack ; false = this is just a
* test
* @return Pair<Integer, Ship>
* Integer = 0 if the mine is not in a right place ; Integer = 1 if the mine
* is in the place of a ship. Ship = null if the ship isn't destroyed ; ship
...
...
@@ -469,20 +495,13 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
*/
@Override
public
Pair
<
Integer
,
Ship
>
attack
(
Coordinate
coords
,
boolean
isAttack
,
Player
playerWhoPutTheMine
)
{
if
(
isAttack
)
{
System
.
out
.
println
(
"datafacade | attack "
+
coords
.
getX
()+
"-"
+
coords
.
getY
());
}
try
{
Pair
<
Integer
,
Ship
>
pairReturn
=
this
.
gameMediator
.
attack
(
coords
,
isAttack
,
playerWhoPutTheMine
);
return
this
.
gameMediator
.
attack
(
coords
,
isAttack
,
playerWhoPutTheMine
);
return
pairReturn
;
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
(
);
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
"data | "
+
ex
.
getMessage
()
);
return
null
;
}
}
...
...
@@ -496,7 +515,7 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
*/
@Override
public
List
<
Event
>
getPreviousBoard
()
{
throw
new
UnsupportedOperationException
(
"Not supported yet."
);
//To change body of generated methods, choose Tools | Templates.
return
new
ArrayList
<
Event
>();
}
/**
...
...
@@ -506,9 +525,7 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
*/
@Override
public
List
<
Event
>
getNextBoard
()
{
//throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
return
null
;
return
new
ArrayList
<
Event
>();
}
/**
...
...
@@ -518,9 +535,9 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
*/
@Override
public
void
sendMessage
(
String
text
)
{
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
"data | send message "
+
text
);
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
"data | send message "
+
text
);
this
.
gameMediator
.
sendMessage
(
text
);
}
...
...
@@ -573,7 +590,6 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
* Get a user profile
*
* @param id the id of the user to get his profile
* @return the public user
*
*/
@Override
...
...
@@ -666,49 +682,74 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain {
this
.
userMediator
.
setIPDiscovery
(
discoveryNodes
);
}
/**
*
* @param profile
*/
public
void
receivePublicUserProfile
(
PublicUser
profile
)
{
try
{
this
.
ihmMainFacade
.
recievePublicUserProfile
(
profile
);
}
catch
(
IOException
ex
)
{
ex
.
printStackTrace
();
//Logger.getLogger(DataFacade.class.getName()).log(Level.SEVERE, null, ex);
Logger
.
getLogger
(
DataFacade
.
class
.
getName
()).
log
(
Level
.
INFO
,
null
,
ex
.
getMessage
());
}
}
/**
*
* @param id
* @param role
*/
@Override
public
void
gameConnectionRequestGame
(
String
id
,
String
role
)
{
this
.
gameMediator
.
gameConnectionRequestGame
(
id
,
role
);
}
/**
*
* @param netinterface
*/
@Override
public
void
setNetworkInterface
(
InterfaceAddress
net
_
interface
)
{
public
void
setNetworkInterface
(
InterfaceAddress
netinterface
)
{
if
(
this
.
getComfacade
()
!=
null
)
{
this
.
getComfacade
().
setUsedInterface
(
net
_
interface
);
this
.
getComfacade
().
setUsedInterface
(
netinterface
);
}
}
/**
*
* @param game
* @throws DataException
*/
@Override
public
void
receptionGame
(
Game
game
)
throws
DataException
{