Assignment Git-TTT

Due Friday Oct. 3 12PM.

Prerequisistes

The webpage http://cs.lmu.edu/~ray/notes/javanetexamples/ contains a/an TicTacToe client/server example. Working in teams of two one student will create a gitlab project called TTTClient and the other student wil create a project TTTServer, both on gitlab.creighton.edu. Add your partner and your instructor to the project as members.

 

Gitlab

  1. Create a project in gitlab, say TTTGame.
  2. Create a project in Eclipse of the same name.
  3. In Eclipse
    1. Right click on project and select Team->Share and create a local git repository outside of the Eclipse workspace directory. For example, /Users/mjw53172/git/TTTGame or /Users/mjw53172/Documents/git/TTTGame would be a typical location for the git repository while /Users/mjw53172/Documents/workspace/TTTGame would house the Eclipse project.
    2. Goto the source folder in Project Explorer and add a package named with your netid and then add two java class named with your and your parteners netid s.
    3. Right click on project and select Team->Commit. Check all the files in the list at the bottom.
    4. Right click on project and select Team->Remote->Push. Fill in the server gitlab.creighton.edu project mjw53172/tttgame.git with the html protocol and fill in the account infoo for gitlab. On the Specifications page select master and Add All Branches
      gitlab
  4. Sign onto gitlab and see that the code is on the server.
  5. Check that your partner can Clone the project from gitlb into eclipse.

Refactor

Refactor the projects, TTTClient andt TTTServer so that the TicTacToe*.java file contains ONLY the function main. Here Commit is you friend since you can Commit, try stuff out, and if it does not work you can revert.

The project should be refactored to conform to the Model-View-Controller architecture. Additional classes, such as Square, which was an Inner Class, may be introduced to produce a/an aesthetic design.

There will be at least 5 classes in the project, though some could turn out to be empty. Continuing with the TTTGame example, the project might include:

  1. Square.java
  2. TTTGameModel.java
  3. TTTGame.java (contains only main and 3 local fields tttGameModel, tttGameView and tttGameControl)
  4. TTTGameView.java
  5. TTTGameControl.java
  6. mjw53172.java