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
24
All threads resolved!
Hide all comments
Merged
Alexandre Ducarne
requested to merge
feature/com/serverClasses
into
int/v1
5 years ago
Overview
2
Commits
1
Pipelines
0
Changes
24
All threads resolved!
Hide all comments
Expand
0
0
Merge request reports
Viewing commit
1b8d95f5
Show latest version
24 files
+
431
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
24
Search (e.g. *.vue) (Ctrl+P)
1b8d95f5
Added interfaces & common datamodel classes
· 1b8d95f5
Corentin-Boulanger
authored
5 years ago
src/baleine/common/interfaces/client/IComToData.java
0 → 100644
+
117
−
0
Options
package
baleine.common.interfaces.client
;
import
java.util.ArrayList
;
import
java.util.UUID
;
import
baleine.common.dataModel.Board
;
import
baleine.common.dataModel.GameHeavy
;
import
baleine.common.dataModel.GameLight
;
import
baleine.common.dataModel.Message
;
import
baleine.common.dataModel.UserLight
;
/**
* IComToData This class is an interface which provides client methods to
* communicate from Com to Data modules.
*/
public
interface
IComToData
{
/**
* Sends a user profile to the data module.
*
* @param user : the user to forward
*/
public
void
forwardPlayerProfile
(
UserLight
user
);
/**
* Adds an authenticated player to local data.
*
* @param user : the user to add
*/
public
void
addAuthenticatedPlayer
(
UserLight
user
);
/**
* Receives the data from a game.
*
* @param user : the list of users of the game
*/
public
void
receiveGameData
(
ArrayList
<
UserLight
>
user
);
/**
* Adds a new user to the list.
*
* @param user : the user to add to the list
*/
public
void
addNewUser
(
UserLight
user
);
/**
* Notifies the data module that a new game has been created.
*
* @param newGameCreated : the game created
*/
public
void
notifyNewGame
(
GameLight
newGameCreated
);
/**
* Sends a saved game to the data module.
*
* @param game : the game saved
* @param userId : the UUID of the user who saves the game
*/
public
void
sendGameSave
(
GameHeavy
game
,
UUID
userId
);
/**
* Receives a chat message.
*
* @param message : the message to receive
*/
public
void
receiveChatMessage
(
Message
message
);
/**
* Notifies the data module that a user has been disconnected.
*
* @param user : the UUID of the disconnected user
*/
public
void
removeDisconnectedUser
(
UUID
user
);
/**
* Notifies the data module that a new spectator has been added.
*
* @param spectator : the new spectator
*/
public
void
addSpectatorToGame
(
UserLight
spectator
);
/**
* Receives the answer to a game join request.
*
* @param isAccepted : the answer to the join request
* @param gameUUID : the UUID of the game to join
*/
public
void
receiveJoinRequestAnswer
(
boolean
isAccepted
,
UUID
gameUUID
);
/**
* Receives a join request.
*
* @param userProposingUUID : the UUID of the user wanting to join the game
* @param gameUUID : the UUID of the game to join
*/
public
void
receiveJoinRequest
(
UUID
userProposingUUID
,
UUID
gameUUID
);
/**
* Notifies that the game is ended.
*
* @param game : the game ended
*/
public
void
notifyEndGame
(
GameLight
game
);
/**
* Notifies the data module that the board has been updated.
*
* @param board : the board updated
*/
public
void
updateBoard
(
Board
board
);
/**
* Ends a game in the data modue.
*
* @param endGameInfo : the game ended
*/
public
void
endGame
(
GameLight
endGameInfo
);
}
Loading