reorganize ex6

This commit is contained in:
2026-02-07 12:57:27 +01:00
parent a425be712e
commit ef4fdc1c9c
6 changed files with 27 additions and 9 deletions

18
src/Ex6/README.md Normal file
View File

@@ -0,0 +1,18 @@
# Architecture
- The main package contains the logic.
- The network package contains the protocol implementation details.
# Running the program
## Launch server
Run Serveur.java
## Launch Client
Run Client.java
## Launch Server + Client
Run App.java

View File

@@ -1,4 +1,4 @@
package Ex6;
package Ex6.main;
import java.io.IOException;
import java.net.Socket;

View File

@@ -1,11 +1,11 @@
package Ex6;
package Ex6.main;
import java.io.IOException;
import java.net.Socket;
import java.util.Arrays;
import java.util.Scanner;
import Ex6.Jeu.EtatCase;
import Ex6.main.Jeu.EtatCase;
import Ex6.network.Connexion;
import Ex6.network.packets.EndGamePacket;
import Ex6.network.packets.InvalidMovePacket;

View File

@@ -1,4 +1,4 @@
package Ex6;
package Ex6.main;
import java.util.Arrays;
import java.util.Random;
@@ -88,7 +88,7 @@ public class Jeu {
/**
* Apply a move for the current player.
* Be aware that the move is not checked and should be done before.
* @see Ex6.Jeu.checkWin
* @see Ex6.main.Jeu.checkWin
* @param cellIndex index of the cell to replace.
* @return EtatCase.Vide if no one won.
*/

View File

@@ -1,9 +1,9 @@
package Ex6;
package Ex6.main;
import java.io.IOException;
import java.net.Socket;
import Ex6.Jeu.EtatCase;
import Ex6.main.Jeu.EtatCase;
import Ex6.network.Connexion;
import Ex6.network.packets.EndGamePacket;
import Ex6.network.packets.InvalidMovePacket;

View File

@@ -1,4 +1,4 @@
package Ex6;
package Ex6.main;
import java.io.IOException;
import java.net.ServerSocket;
@@ -22,7 +22,7 @@ public class Serveur {
}
/**
* Start a TicTacTo server on the specified port
* Start a TicTacToe server on the specified port
* @param port the port to listen to
* @throws IOException
*/