Skip to content

Commit

Permalink
Merge pull request #18 from davidroster/master
Browse files Browse the repository at this point in the history
Lab07 - Complete legacy
  • Loading branch information
sean-shelton authored Dec 7, 2017
2 parents 2817ecc + f65afaf commit 3ffd4dd
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 6 deletions.
22 changes: 22 additions & 0 deletions F17_lab09.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
List of potential issues to add:
1. [Add J-unit testing (100 points)](https://github.com/UCSB-CS56-Projects/cs56-games-client-server-v2/issues/19)
-> For games
-> Also for the server - client interaction


2. [Cleanup the interaction between Server & Client (200-300 points)](https://github.com/UCSB-CS56-Projects/cs56-games-client-server-v2/issues/20)
-> The code works great, however, its not easy to understand
-> After talking with our TA Kevin, he thought some of the interactions between client and server were "clever" but could be handled better.

3. [A leader board of each session of gaming. (100 points)](https://github.com/UCSB-CS56-Projects/cs56-games-client-server-v2/issues/21)
-> Keeps track of wins and losses for each session
-> When the terminal is exited and restarted, the leaderboard is restarted

4. [Update the GUI (200 points)](https://github.com/UCSB-CS56-Projects/cs56-games-client-server-v2/issues/22)
-> change all java swing to fx, make as close to original as possible
-> Right now we are using old Java Graphics
-> A better implementation would be to utilize JavaFX

//Refurbished existing issues
5. [Further improving Javadoc (50 points)](https://github.com/UCSB-CS56-Projects/cs56-games-client-server-v2/issues/23)
6. Add Chess game (300-350 points)
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ How to Run
After compiling, use "ant run-client" and "ant run-server" to start a client or a server respectively.
Only 1 server is necessary, but many clients can be created to play and spectate in the server ran lobby.Currently, this project is only runnable on one computer. In the future, we will expand functionality to be able to play on multiple csil computers.

project history
Project history
===============
Fall 2017, Hong Wang & David Roster:

V2:A new version of cs56-games-client-server that is identical on the outside, but substantially refactored inside to have better MVC separation.
A new version of cs56-games-client-server that is identical on the outside, but substantially refactored inside to have better MVC separation.

Refactored JavaClient and other complex classes to create a more easily understood code while maintainingfunction. Javdoc descriptions have been added for every class and nearly every method. These descriptions will provide helpful insight when deciphering this beauty of a beast project.

We also changed the structure of classes by having just a client & Server directory with their respected Views, models, and controller directories inside. THis can be made very clear by typing "tree" into our root directory called v2 (cs56/cs56-games-client-server-v2/src/edu/ucsb/cs56/games/client_server/v2). WE believed this would help with future user understanding.
We also changed the structure of classes by having a client, server, and games directory with their respected Views, models, and controller directories inside. THis can be made very clear by typing "tree" into our root directory called v2 (cs56/cs56-games-client-server-v2/src/edu/ucsb/cs56/games/client_server/v2). WE believed this would help with future user understanding.

v2: The version from Spring 2013.


Tips
Expand All @@ -41,3 +42,14 @@ Controller -> This stands for Logic which means that most of our logic handling
Model -> This is where the data of our actual game is processed and sent between controllers for processing.

Views -> This provides both our GUI application for Server and Client. Server is able to run on the command line but that's not as cool.

F17 Final Remarks
=======================
Explaination of the refactorization of JavaClient and JavaServer:
JavaClient gained 3 helper files. MyCellRenderer and RefreshThread used to be parralel classes inside JavaClient.java, and now they are in their own files. MessageHandler is a helper class that provides helper methods for handleMessage() method from JavaClient.
JavaServer was split into two parts. JavaServer now extends a new abstract class named JavaServerTemplate, which stores the basic methods and variable declarations for JavaServer.

Breakdown of abstract class design:
In certain packages(directories), such as games, there is one or more abstract classes that other classes extend from. For example, each of the subdirectories of Games (ClientController, Models, ServerCobtroller, Views) has an abstract class that each of the other classes implement. These abstract classes are respectively "TwoPlayerGameController, TwoPlayerGameModel, TwoPlayerGameController, TwoPLayerGameViewPanel". The reason for creating these abstract classes are it provides a correct layout for creating other games such as possibly chess. When creating a new game such as chess, you would need to make 4 classes minimum (not including any refactored classes or additional helper classes) that EXTEND these abstarct classes.

From our testings, we did not observe any bugs. We did however observe that we created some complex methods such as checkWinner() in our Gomoku Game. This might need refactorization if the Conrad or the TA's deem it necessary. A resource to use to check how your code is (kinda like a report card) is codeClimate. Just submit your open source github files to it and it will relay back possible improvements to make.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
//start a java message server that listens for connections to port X and then connects the client
public abstract class JavaServerTemplate{
//this belongs to the server itself, independent of the chat standards
public static ArrayList<ClientNetworkController> clients;
public static ArrayList<ServiceController> services;
protected static ArrayList<ClientNetworkController> clients;
protected static ArrayList<ServiceController> services;
protected LobbyController lobby;

protected boolean running;
Expand Down

0 comments on commit 3ffd4dd

Please sign in to comment.