Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ai12-othello
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexandre Ducarne
ai12-othello
Merge requests
!8
Feature/com/server classes
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Feature/com/server classes
feature/com/serverClasses
into
int/v1
Overview
2
Commits
1
Pipelines
0
Changes
2
Merged
Alexandre Ducarne
requested to merge
feature/com/serverClasses
into
int/v1
5 years ago
Overview
2
Commits
1
Pipelines
0
Changes
2
Expand
0
0
Merge request reports
Viewing commit
35ba3831
Show latest version
2 files
+
91
−
13
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
35ba3831
added javadoc for server.IComToData and server.IDataToCom
· 35ba3831
Corentin-Boulanger
authored
5 years ago
src/baleine/common/interfaces/server/IComToData.java
+
65
−
10
Options
@@ -10,23 +10,78 @@ import baleine.common.dataModel.Message;
import
baleine.common.dataModel.Move
;
import
baleine.common.dataModel.UserLight
;
/**
* IComToData This class is an interface which provides server methods to
* communicate from Com to Data modules.
*/
public
interface
IComToData
{
public
void
requestPlayerByUUID
(
UUID
playerID
);
public
void
addNewUser
(
UserLight
userLight
);
/**
* Requests a player by its UUID.
*
* @param playerID : the UUID of the player to retrieve
*/
public
void
requestPlayerByUUID
(
UUID
playerID
);
public
void
createGame
(
GameLight
gameLight
);
/**
* Adds a new user to the list.
*
* @param userLight : the user to add
*/
public
void
addNewUser
(
UserLight
userLight
);
public
void
requestGameSave
(
UUID
gameID
);
/**
* Create a new game.
*
* @param gameLight : the game to create
*/
public
void
createGame
(
GameLight
gameLight
);
public
Message
receiveNewChatMessage
(
String
message
,
Timestamp
timestamp
,
UUID
userID
,
UUID
gameID
);
/**
* Request saving a game by UUID.
*
* @param gameID : the UUID of the game to save
*/
public
void
requestGameSave
(
UUID
gameID
);
public
ArrayList
<
UUID
>
getAllGameParticipants
(
UUID
gameID
);
/**
* Receive a new chat message to transfer it.
*
* @param message : the message to transfer
* @param timestamp : the timestamp of the message
* @param userID : the UUID of the user sending the message
* @param gameID : the UUID of the game in which the message was sent
* @return the message to transfer
*/
public
Message
receiveNewChatMessage
(
String
message
,
Timestamp
timestamp
,
UUID
userID
,
UUID
gameID
);
public
void
disconnectUser
(
UUID
userID
);
/**
* Get all the participants (players & spectators) of a game.
*
* @param gameID : the UUID of the game
* @return the list of users
*/
public
ArrayList
<
UUID
>
getAllGameParticipants
(
UUID
gameID
);
public
void
addSpectator
(
GameLight
gameLight
,
UserLight
userLight
);
/**
* Notifies that a user has been disconnected.
*
* @param userID : the UUID of the disconnected user
*/
public
void
disconnectUser
(
UUID
userID
);
public
void
sendMove
(
Move
move
);
/**
* Adds a spectator to a game.
*
* @param gameLight : the game concerned
* @param userLight : the user to add as spectator
*/
public
void
addSpectator
(
GameLight
gameLight
,
UserLight
userLight
);
/**
* Send a move to the data module.
*
* @param move : the move to send
*/
public
void
sendMove
(
Move
move
);
}
\ No newline at end of file
Loading