Comments (1)
This class, being the implementation of AbstractClient
, will implement handleMessageFromServer()
and it has the method to send objects to the server. The class diagram connects each data class to their respective GUI controllers, so I've decided that in order to keep true to the diagram, we will have this class delegate task to the controller classes. For example, when the handleMessageFromServer()
receives an object of the WaitingRoomData
class, call the method receiveWaitingRoomData()
on WaitingRoomController.
Example:
private ChessClient client; // linked to main class in constructor
public void handleMessageFromServer(Object o) {
...
if (o instanceof WaitingRoomData) {
client.getWaitingRoomControl().receiveWaitingRoomData();
}
...
if (o instanceof NextTurnData) {
client.getGameControl().receiveNextTurnData();
}
...
}
This means that the currently open controller will handle the incoming data after this class figures out what that data is. Therefore, each view controller will need to have a receive
method for every data class it will receive.
from chessgame.
Related Issues (20)
- Implement Game Room GUI HOT 1
- Implement send/receive methods for Game Control
- Implement send/receive methods for Waiting Room Control
- Implement send/receive methods for Login Control
- Implement send/receive methods for CreateAccountControl
- Waiting Room Player List Panel
- Waiting Room Player View Panel
- Implement AbandonGameData and handle it in GameCommunication
- Add waiting room players to EndOfGameData
- Build Moves GUI
- Build Captured Pieces GUI
- Add GameData
- Waiting Room comes up empty if player entered in wrong password at least once
- Re-enable buttons after starting a second game
- Provide game data in end of game to show final move
- Queen doesn't show available moves
- Wrong winner is reported
- No waiting room players are returned when player abandons game
- Implement piece promotion UI
- Update WaitingRoomData when receiving information even if showing that screen
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chessgame.