Commits

Cédric Bonhomme  committed 36bd7d4

Initial commit.

  • Participants

Comments (0)

Files changed (191)

File ClientReseau/src/client/Carte.java

+package client;
+
+public class Carte {
+	private int carte[][] =
+	{
+			{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
+			{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
+			{0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
+			{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
+			{0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
+			{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
+			{0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
+			{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
+			{0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
+			{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
+			{0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
+			{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
+			{0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
+			{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
+			{0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
+			{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
+			{0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
+			{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
+			{0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
+			{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
+			{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
+	};
+
+	public Carte()
+	{
+		//
+	}
+	
+	public int getVal(int l, int r)
+	{
+		return carte[l][r];
+	}
+	
+	public String toString()
+	{
+		String s = "";
+		int i,j;
+		for (i=0;i<=19;i++)
+		{
+			s = s + i + ":";
+			for (j=0;j<=19;j++)
+			{
+				s = s + carte[i][j];
+			}
+			s = s + "\n";
+		}
+		return s;
+	}
+}

File ClientReseau/src/client/CaseFantome.java

+package client;
+
+import java.awt.Color;
+
+public class CaseFantome extends CaseGrille {
+
+	public CaseFantome(int id) {
+		super(Integer.toString(id));
+		this.setBackground(Color.RED);
+	}
+
+}

File ClientReseau/src/client/CaseGrille.java

+package client;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+
+public class CaseGrille extends JButton /*implements ActionListener*/ {
+
+	/**
+	 * 
+	 */
+	//private String libelle;
+	private static final long serialVersionUID = 1L;
+	
+	public CaseGrille(String libelle) {
+		super(libelle);
+		/*this.addActionListener(this);*/
+	}
+
+	/*
+	public void actionPerformed(ActionEvent e) {
+		// TODO Auto-generated method stub
+		CaseGrille c = (CaseGrille) e.getSource();
+		System.out.println(c.getText());
+	}
+	*/
+
+}

File ClientReseau/src/client/CaseMur.java

+package client;
+
+import java.awt.Color;
+import java.awt.event.ActionListener;
+
+
+public class CaseMur extends CaseGrille {
+
+	private static final long serialVersionUID = 1L;
+
+	public CaseMur()
+	{
+		super("M");
+		this.setBackground(Color.BLACK);
+		//this.addKeyListener(new MyKeyListener());
+		//this.addMouseMotionListener(new MyMouseMotionListener());
+	}
+
+}

File ClientReseau/src/client/CasePacman.java

+package client;
+
+import java.awt.Color;
+
+public class CasePacman extends CaseGrille {
+
+	public CasePacman(int id) {
+		super(Integer.toString(id));
+		this.setBackground(Color.YELLOW);
+	}
+
+}

File ClientReseau/src/client/CaseSol.java

+package client;
+
+import java.awt.Color;
+import java.awt.event.ActionListener;
+
+
+public class CaseSol extends CaseGrille {
+
+	private static final long serialVersionUID = 1L;
+	
+	public CaseSol()
+	{
+		super("S");
+		this.setBackground(Color.GRAY);
+	}
+
+}

File ClientReseau/src/client/FenetreJeu.java

+package client;
+
+import java.awt.BorderLayout;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.WindowEvent;
+import java.awt.event.WindowListener;
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+import java.util.ArrayList;
+
+import javax.swing.JFrame;
+
+public class FenetreJeu extends JFrame implements KeyListener, WindowListener {
+	
+	private static final long serialVersionUID = 4645651273806629125L;
+	private Grille grille;
+	//private int id_joueur;
+	private Jeu jeu;
+	private Panel_connexion pan_c;
+
+	public FenetreJeu()
+	{
+		super("Pacman");
+		pan_c = new Panel_connexion(this);
+		this.setLayout(new BorderLayout());
+		this.add(pan_c, BorderLayout.WEST);
+		this.grille = new Grille(new Carte(), new ArrayList<Joueur>());
+		this.add(grille, BorderLayout.CENTER);
+		this.setSize(800, 600);
+		//this.pack();
+		this.setResizable(false);
+		this.addKeyListener(this);
+		this.addWindowListener(this);
+		this.setVisible(true);
+	}
+	
+	public void setGrille(Grille grille) {
+		this.remove(this.grille);
+		//this.remove(pan_c);
+		//System.out.println("Avant:\n"+this.grille.toString());
+		this.grille = grille;
+		this.add(grille, BorderLayout.CENTER);
+		//System.out.println("Apr�s:\n"+this.grille.toString());
+		//this.pack();
+		//this.repaint();
+		this.grille.revalidate();
+		this.requestFocusInWindow();
+	}
+
+	public void keyPressed(KeyEvent e) {
+		System.out.println(e.getKeyCode()+"\n");
+		//G 37
+		//H 38
+		//D 39
+		//B 40
+
+		if (jeu.deplacerJoueurLocal(e.getKeyCode()))
+		{
+			/*
+			try
+			{
+				Socket s = new Socket(InetAddress.getByName("127.0.0.1"),2332);
+				ThreadEnvoie th = new ThreadEnvoie(s, nr, nl);
+				System.out.println("Connexion au serveur...");
+				th.start();
+				th.join();
+				s.close();
+			}
+			catch (Exception ex)
+			{
+				System.out.println(ex);
+			}
+			*/
+			System.out.println("OK");
+		}
+		else
+		{
+			System.out.println("D�placement impossible");
+		}
+	}
+
+	public void keyReleased(KeyEvent arg0) {
+		// TODO Auto-generated method stub
+		//System.out.println("D�placement impossible");
+	}
+
+	public void keyTyped(KeyEvent arg0) {
+		// TODO Auto-generated method stub
+		//System.out.println("D�placement impossible");
+	}
+
+	public Jeu getJeu() {
+		return jeu;
+	}
+
+	public void setJeu(Jeu jeu) {
+		this.jeu = jeu;
+		jeu.setFen(this);
+		this.setGrille(jeu.getGrille());
+	}
+
+	public void windowActivated(WindowEvent arg0) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void windowClosed(WindowEvent arg0) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void windowClosing(WindowEvent arg0) {
+		// TODO Auto-generated method stub
+		String msg;
+		msg = "DEC:"+this.getJeu().getId_joueur();
+		System.out.println("Deconnexion: envoi "+msg);
+		ThreadEnvoiUDP t = new ThreadEnvoiUDP(this.getJeu().getAddr(), this.getJeu().getPort(), msg);
+		t.run();
+		if (this.getJeu()!=null && this.getJeu().getThread()!=null) {
+			this.getJeu().getThread().Stopper();
+		}
+		System.out.println("Fermeture...");
+		System.exit(0);
+		
+	}
+
+	public void windowDeactivated(WindowEvent arg0) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void windowDeiconified(WindowEvent arg0) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void windowIconified(WindowEvent arg0) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void windowOpened(WindowEvent arg0) {
+		// TODO Auto-generated method stub
+		
+	}
+
+}

File ClientReseau/src/client/Grille.java

+package client;
+
+import java.awt.GridLayout;
+import java.util.ArrayList;
+
+import javax.swing.JPanel;
+
+public class Grille extends JPanel{
+
+	private CaseGrille grille[][];
+	ArrayList<Joueur> joueurs;
+	Carte carte;
+	
+	public String toString()
+	{
+		int i,j;
+		String res = "";
+		for(i=0;i<=20;i++)
+		{
+			for(j=0;j<=20;j++)
+			{
+				res += grille[i][j].getText();
+			}
+			res += "\n";
+		}
+		return res;
+	}
+	
+	public Grille(Carte carte, ArrayList<Joueur> joueurs) {
+		this.joueurs = joueurs;
+		this.carte = carte;
+		grille = new CaseGrille[21][21];
+		this.Refresh();
+	}
+
+	public void Refresh()
+	{
+		int i,j;
+		this.setLayout(null);
+		this.setLayout(new GridLayout(21,21));
+		for(i=0;i<=20;i++)
+		{
+			for(j=0;j<=20;j++)
+			{
+				int k;
+				boolean joueur = false;
+				int id_j=0;
+				char t='l';
+				for (k=0;k<joueurs.size();k++)
+				{
+					if (joueurs.get(k).getR()==i && joueurs.get(k).getC()==j)
+					{
+						joueur = true;
+						t = joueurs.get(k).getType();
+						id_j = joueurs.get(k).getId();
+						break;
+					}
+				}
+				if (joueur)
+				{
+					if (t=='p')
+						grille[i][j] = new CasePacman(id_j);
+					else
+						if (t=='f')
+							grille[i][j] = new CaseFantome(id_j);
+				}
+				else
+				{
+					if (carte.getVal(i, j)==1)
+					{
+						grille[i][j] = new CaseSol();
+					}
+					else
+					{
+						grille[i][j] = new CaseMur();
+					}
+				}
+				this.add(grille[i][j]);
+			}
+		}
+	}
+
+	/*
+	public void deplacerJoueur(int id, int r, int c) {
+		// TODO Auto-generated method stub
+		int i, ar=0, ac=0;
+		for (i=0; i<joueurs.size(); i++) {
+			if (joueurs.get(i).getId()==id) {
+				ar = joueurs.get(i).getR();
+				ac = joueurs.get(i).getC();
+				joueurs.get(i).setR(r);
+				joueurs.get(i).setC(c);
+			}
+		}
+		if (carte.getVal(ar, ac)==1)
+		{
+			grille[ar][ac] = new CaseSol();
+		}
+		else
+		{
+			grille[ar][ac] = new CaseMur();
+		}
+		//grille[r][c] = new CaseJoueur(id);
+		this.Refresh();
+	}
+	
+	public boolean deplacerCeJoueur(int id, int d)
+	{//renvoie true si le d�placement est possible
+		int i, ar=0, ac=0;
+		for (i=0; i<joueurs.size(); i++) {
+			if (joueurs.get(i).getId()==id) {
+				ar = joueurs.get(i).getR();
+				ac = joueurs.get(i).getC();
+			}
+		}
+		//Joueur j = grille.getJoueur(id);
+		//int l = j.getL();
+		//int r = j.getC();
+		switch (d)
+		{
+		case 37:
+		{//gauche
+			if (carte.getVal(ar, ac-1)==1)
+			{
+				//this.deplacerJoueur(id, ar, ac-1);
+				return true;
+			}
+			break;
+		}
+		case 38:
+		{//haut
+			if (carte.getVal(ar-1, ac)==1)
+			{
+				//this.deplacerJoueur(id, ar-1, ac);
+				return true;
+			}
+			break;
+		}
+		case 39:
+		{//droite
+			if (carte.getVal(ar, ac+1)==1)
+			{
+				//this.deplacerJoueur(id, ar, ac+1);
+				return true;
+			}
+			break;
+		}
+		case 40:
+		{//bas
+			if (carte.getVal(ar+1, ac)==1)
+			{
+				//this.deplacerJoueur(id, ar+1, ac);
+				return true;
+			}
+			break;
+		}
+		default:
+		{
+			return false;
+		}
+		}
+		return false;
+	}
+*/
+}

File ClientReseau/src/client/Jeu.java

+package client;
+
+import java.net.InetAddress;
+import java.util.ArrayList;
+
+public class Jeu {
+	private ArrayList<Joueur> list_joueur;
+	private Carte carte;
+	private Grille grille;
+	private int id_joueur;
+	private FenetreJeu fen;
+	private ThreadEcouteServeurUDP thread;
+	
+	private InetAddress addr;
+	private int port;
+	
+	public Jeu(Carte carte, int id_joueur, ArrayList<Joueur> liste) {
+		this.carte = carte;
+		this.id_joueur = id_joueur;
+		this.list_joueur = new ArrayList<Joueur>();
+		int i;
+		for (i=0;i<liste.size();i++)
+		{
+			Joueur tmp = liste.get(i);
+			list_joueur.add(new Joueur(tmp.getId(), tmp.getType(), tmp.getNom(), tmp.getR(), tmp.getC()));
+		}
+		this.grille = new Grille(carte, list_joueur);
+		//System.out.println("Jeu: \n"+grille.toString());
+		fen = null;
+	}
+	
+	public void ajouterJoueur(int id, char t, String nom, int r, int c) {
+		list_joueur.add(new Joueur(id, t, nom, r, c));
+		//grille.ajouterJoueur(id, r, c);
+		grille = new Grille(carte, list_joueur);
+		fen.setGrille(grille);
+	}
+	
+	public boolean deplacerJoueurLocal(int d)
+	{
+		{//renvoie true si le d�placement est possible
+			boolean envoi = false;
+			int i, ar=0, ac=0;
+			for (i=0; i<list_joueur.size(); i++) {
+				if (list_joueur.get(i).getId()==id_joueur) {
+					ar = list_joueur.get(i).getR();
+					ac = list_joueur.get(i).getC();
+				}
+			}
+			System.out.println("Ligne: " + ar + "Colonne: " + ac);
+			//Joueur j = grille.getJoueur(id);
+			//int l = j.getL();
+			//int r = j.getC();
+			int nr=ar,nc=ac;
+			switch (d)
+			{
+			case 37:
+			{//gauche
+				if (carte.getVal(ar, ac-1)==1)
+				{
+					//this.deplacerJoueur(id, ar, ac-1);
+					envoi =  true;
+					nc=nc-1;
+				}
+				break;
+			}
+			case 38:
+			{//haut
+				if (carte.getVal(ar-1, ac)==1)
+				{
+					//this.deplacerJoueur(id, ar-1, ac);
+					envoi = true;
+					nr=ar-1;
+				}
+				break;
+			}
+			case 39:
+			{//droite
+				if (carte.getVal(ar, ac+1)==1)
+				{
+					//this.deplacerJoueur(id, ar, ac+1);
+					envoi =  true;
+					nc=ac+1;
+				}
+				break;
+			}
+			case 40:
+			{//bas
+				if (carte.getVal(ar+1, ac)==1)
+				{
+					//this.deplacerJoueur(id, ar+1, ac);
+					envoi =  true;
+					nr=ar+1;
+				}
+				break;
+			}
+			default:
+			{
+				envoi =  false;
+			}
+			}
+			if (envoi)
+			{
+				String msg = "MVT:"+id_joueur+":"+nr+":"+nc;
+				ThreadEnvoiUDP th = new ThreadEnvoiUDP(addr,port,msg);
+				th.start();
+			}
+			return envoi;
+		}
+	}
+	
+	public void deplacerJoueur(int id, int r, int c) {
+		int i;
+		for (i=0; i<list_joueur.size(); i++) {
+			if (list_joueur.get(i).getId()==id) {
+				list_joueur.get(i).setR(r);
+				list_joueur.get(i).setC(c);
+			}
+		}
+		grille = new Grille(carte, list_joueur);
+		fen.setGrille(grille);
+		//grille.deplacerJoueur(id, r, c);
+	}
+	
+	public void supprimerJoueur(int id) {
+		int i, pos=0;
+		for (i=0; i<list_joueur.size(); i++) {
+			if (list_joueur.get(i).getId()==id) {
+				pos=i;
+			}
+		}
+		if (pos!=0)
+		{
+			System.out.println("Suppression du joueur "+id);
+			list_joueur.remove(pos);
+			grille = new Grille(carte, list_joueur);
+			fen.setGrille(grille);
+		}
+		else
+		{
+			System.out.println("Joueur non trouv�");
+		}
+	}
+
+	public Grille getGrille() {
+		return grille;
+	}
+
+	public FenetreJeu getFen() {
+		return fen;
+	}
+
+	public void setFen(FenetreJeu fen) {
+		this.fen = fen;
+	}
+
+	public ThreadEcouteServeurUDP getThread() {
+		return thread;
+	}
+
+	public void setThread(ThreadEcouteServeurUDP thread) {
+		this.thread = thread;
+	}
+
+	public InetAddress getAddr() {
+		return addr;
+	}
+
+	public void setAddr(InetAddress addr) {
+		this.addr = addr;
+	}
+
+	public int getPort() {
+		return port;
+	}
+
+	public void setPort(int port) {
+		this.port = port;
+	}
+
+	public int getId_joueur() {
+		return id_joueur;
+	}
+
+	public void setId_joueur(int id_joueur) {
+		this.id_joueur = id_joueur;
+	}
+
+}

File ClientReseau/src/client/Joueur.java

+package client;
+
+public class Joueur {
+
+	private int id;
+	private String nom;
+	private int r;
+	private int c;
+	private char type;
+	
+	public Joueur(int id, char t, String nom, int r, int c) {
+		super();
+		this.id = id;
+		this.type = t;
+		this.nom = nom;
+		this.r = r;
+		this.c = c;
+	}
+	
+	public int getId() {
+		return id;
+	}
+	public void setId(int id) {
+		this.id = id;
+	}
+	public String getNom() {
+		return nom;
+	}
+	public void setNom(String nom) {
+		this.nom = nom;
+	}
+	public int getR() {
+		return r;
+	}
+	public void setR(int r) {
+		this.r = r;
+	}
+	public int getC() {
+		return c;
+	}
+	public void setC(int c) {
+		this.c = c;
+	}
+
+	public char getType() {
+		return type;
+	}
+
+	public void setType(char type) {
+		this.type = type;
+	}
+
+}

File ClientReseau/src/client/Panel_connexion.java

+package client;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.io.IOException;
+import java.net.DatagramSocket;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+public class Panel_connexion extends JPanel {
+
+	JTextField chp_adr = new JTextField(10);
+	JTextField chp_port = new JTextField(10);
+	JButton btn_ok = new JButton();
+	JButton btn_cl = new JButton();
+	GridLayout gridLayout1 = new GridLayout(11,2);
+	JPanel jPanel2 = new JPanel();
+	JLabel messages = new JLabel();
+	
+	JLabel serveurs = new JLabel();
+	JTextField chp_serv = new JTextField(10);
+	JButton btn_sel = new JButton();
+	
+	JTextField chp_login = new JTextField(10);
+	JTextField chp_password = new JTextField(10);
+	
+	JTextField chp_type = new JTextField(10);
+	JTextField chp_nom = new JTextField(10);
+	JButton btn_con = new JButton();
+	JButton btn_ins = new JButton();
+	
+	private Socket s;
+	
+	private String adr;
+	private int port;
+	//serveur partie
+	private String ip_ser;
+	private int port_ser;
+	private int port_ser_ecoute;
+	private String jeton;
+	
+	private boolean connectionTerminee;
+	private FenetreJeu fen;
+	private String[] tab_s;
+	
+	//resultat de la connection
+	private int id;
+	private ArrayList<Joueur> joueurs;
+	
+	public Panel_connexion(FenetreJeu f)
+	{
+		fen = f;
+		init();
+	}
+	
+	void jButtonCONNECTER_actionPerformed(ActionEvent e) {
+		//récupérer la liste des serveurs
+		try
+		{
+			ThreadLogin th_l = new ThreadLogin(s,chp_login.getText(), chp_password.getText(), false);
+			th_l.start();
+			th_l.join();
+			String reponse = th_l.getReponse();
+			String attendu = new String("ok");
+			System.out.println("Reponse Serveur principale:" +reponse);
+			String[] tab_t = reponse.split("@");
+			//System.out.println("Comparaison "+reponse+" et "+attendu+":"+reponse.compareTo(attendu));
+			if (tab_t[1].compareTo(attendu)==0)
+			{
+				s.close();
+		 	   ThreadConnexionPrinc th_cp = new ThreadConnexionPrinc(tab_t[2]);
+		 	   th_cp.start();
+		 	   th_cp.join();
+		 	   tab_s = th_cp.getRes();
+		 	   String msg = "<html>";
+		 	   int i;
+		 	   for (i=0;i<tab_s.length;i++)
+		 	   {
+		 		   System.out.println(i);
+		 		   msg = msg + Integer.toString(i) + "->" + tab_s[i] + "<br>";
+		 	   }
+		 	   msg = msg + "</html>";
+		 	   //ip_ser = "127.0.0.1";
+		 	   //port_ser = 2332;
+		 	   
+		 	   //afficher la liste des serveurs
+		 	   btn_ok.setEnabled(false);
+		 	   btn_cl.setEnabled(false);
+		 	   btn_con.setEnabled(false);
+		 	   btn_ins.setEnabled(false);
+		 	   chp_adr.setEnabled(false);
+		 	   chp_port.setEnabled(false);
+		 	   chp_login.setEnabled(false);
+		 	   chp_password.setEnabled(false);
+		 	   
+		 	   messages.setText(msg);
+		 	   chp_serv.setEnabled(true);
+		 	   chp_type.setEnabled(true);
+		 	   chp_nom.setEnabled(true);
+		 	   btn_sel.setEnabled(true);
+			}
+			else
+			{
+				messages.setText("Probleme:" + reponse);
+				System.out.println("Probleme:" + reponse);
+			}
+		}
+		catch (IOException ex)
+		{
+			//
+		}
+		catch (InterruptedException ex)
+		{
+			//
+		}
+	}
+	
+	void jButtonINSCRIRE_actionPerformed(ActionEvent e) {
+		try
+		{
+			ThreadLogin th_l = new ThreadLogin(s,chp_login.getText(), chp_password.getText(), true);
+			th_l.start();
+			th_l.join();
+			String reponse = th_l.getReponse();
+			System.out.println(reponse);
+			if (reponse.equals("ok"))
+			{
+				messages.setText("Enregistrement effectu�");
+			}
+			else
+			{
+				messages.setText("Probleme"+reponse);
+			}
+		}
+		catch (IOException ex)
+		{
+			System.out.println("Probleme IO inscription");
+			ex.printStackTrace();
+		}
+		catch (InterruptedException ex)
+		{
+			System.out.println("Probleme interrupt inscription");
+			ex.printStackTrace();
+		}
+	}
+	
+	void jButtonSELECT_actionPerformed(ActionEvent e) {
+		//un serveur est sélectionné
+		try {
+			int id_serv_select = Integer.parseInt(chp_serv.getText());
+			String[] info_serv = tab_s[id_serv_select].split(":");
+			jeton = info_serv[6];
+			ip_ser = info_serv[3];
+			port_ser = Integer.parseInt(info_serv[4]);
+			port_ser_ecoute = Integer.parseInt(info_serv[5]);
+			//connexion
+			Socket s = new Socket(InetAddress.getByName(ip_ser), port_ser);
+			//ThreadEnvoiJeton th_j = new ThreadEnvoiJeton(s, jeton);
+			ThreadConnection th_c = new ThreadConnection(s, jeton, chp_type.getText().charAt(0), chp_nom.getText());
+			this.setEnabled(false);
+			th_c.start();
+			th_c.join();
+			connectionTerminee = true;
+			id = th_c.getId_joueur();
+			joueurs = th_c.getJoueurs();
+			fen.setJeu(new Jeu(new Carte(), id, joueurs));
+			DatagramSocket ds = new DatagramSocket(8880);
+			fen.getJeu().setAddr(InetAddress.getByName(ip_ser));
+			fen.getJeu().setPort(port_ser_ecoute);
+			ThreadEcouteServeurUDP th_es = new ThreadEcouteServeurUDP(ds,fen);
+			fen.getJeu().setThread(th_es);
+			th_es.start();
+		}
+		catch (IOException ex) {
+			//
+		}
+		catch (InterruptedException ex) {
+			//
+		}
+	}
+	
+	void jButtonOK_actionPerformed(ActionEvent e) {
+	    //messages.setText(" ");
+		try{
+			System.out.println("Ok");
+			port = new Integer(chp_port.getText());
+			adr = chp_adr.getText();
+			System.out.println(adr + ":" + port);
+			InetAddress addr = InetAddress.getByName(adr);
+	       
+	       
+			s = new Socket(addr, port); //ferm�e dans le thread connexion princ
+			if (s.isConnected()) {
+				chp_adr.setEnabled(false);
+				chp_port.setEnabled(false);
+				btn_ok.setEnabled(false);
+				btn_cl.setEnabled(false);
+				chp_login.setEnabled(true);
+				chp_password.setEnabled(true);
+				btn_con.setEnabled(true);
+				btn_ins.setEnabled(true);
+	       }
+	       else {
+	    	   throw new IOException ();
+	       }
+	       
+	    }
+	    catch(NumberFormatException nfe){
+	       messages.setText("entrer un entier !");
+	    }
+	    catch(IOException io_e) {
+	    	messages.setText("Impossible de se connecter");
+	    	System.out.println("Probleme!") ;
+	    }
+	  }
+
+	  void jButtonCANCEL_actionPerformed(ActionEvent e) {
+	     //messages.setText(" ");
+		 this.setVisible(false);
+	  }
+	
+	public void init() {
+		  btn_ok.addActionListener(new java.awt.event.ActionListener() {
+		      public void actionPerformed(ActionEvent e) {
+		        jButtonOK_actionPerformed(e);
+		      }
+		  });
+		  btn_cl.addActionListener(new java.awt.event.ActionListener() {
+		      public void actionPerformed(ActionEvent e) {
+		    	  jButtonCANCEL_actionPerformed(e);
+		      }
+		  });
+		  btn_sel.addActionListener(new java.awt.event.ActionListener() {
+		      public void actionPerformed(ActionEvent e) {
+		    	  jButtonSELECT_actionPerformed(e);
+		      }
+		  });
+		  btn_con.addActionListener(new java.awt.event.ActionListener() {
+		      public void actionPerformed(ActionEvent e) {
+		    	  jButtonCONNECTER_actionPerformed(e);
+		      }
+		  });
+		  btn_ins.addActionListener(new java.awt.event.ActionListener() {
+		      public void actionPerformed(ActionEvent e) {
+		    	  jButtonINSCRIRE_actionPerformed(e);
+		      }
+		  });
+		  btn_ok.setText("Connecter");
+		  btn_cl.setText("Annuler");
+		  btn_sel.setText("S�lectionner");
+		  btn_con.setText("Se connecter");
+		  btn_ins.setText("S'enregistrer");
+		  jPanel2.setLayout(gridLayout1);
+		  //gridLayout1.setRows(7);
+		  //gridLayout1.setColumns(2);
+		  jPanel2.add(new JLabel("Adresse: "));
+		  jPanel2.add(chp_adr);
+		  jPanel2.add(new JLabel("Port: "));
+		  jPanel2.add(chp_port);
+		  jPanel2.add(btn_ok);
+		  jPanel2.add(btn_cl);
+		  jPanel2.add(new JLabel("Login: "));
+		  jPanel2.add(chp_login);
+		  jPanel2.add(new JLabel("Password: "));
+		  jPanel2.add(chp_password);
+		  jPanel2.add(btn_con);
+		  jPanel2.add(btn_ins);
+		  
+		  jPanel2.add(serveurs);
+		  jPanel2.add(new JLabel());
+		  jPanel2.add(new JLabel("Id serveur: "));
+		  jPanel2.add(chp_serv);
+		  jPanel2.add(new JLabel("Type: "));
+		  jPanel2.add(chp_type);
+		  jPanel2.add(new JLabel("Nom: "));
+		  jPanel2.add(chp_nom);
+		  jPanel2.add(btn_sel);
+		  //jPanel2.validate();
+		  
+		  //this.setLayout(new BorderLayout());
+		  this.setPreferredSize(new Dimension(250, 600));
+		  this.add(jPanel2);
+		  this.add(messages);
+		  
+		  	chp_login.setEnabled(false);
+			chp_password.setEnabled(false);
+			btn_con.setEnabled(false);
+			btn_ins.setEnabled(false);
+		  
+		  chp_serv.setEnabled(false);
+		  chp_type.setEnabled(false);
+		  chp_nom.setEnabled(false);
+		  btn_sel.setEnabled(false);
+	  }
+	
+}

File ClientReseau/src/client/Test.java

+package client;
+
+/*
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.util.ArrayList;
+*/
+
+public class Test {
+
+	/**
+	 * @param args
+	 */
+	public static void main(String[] args) {
+		FenetreJeu f = new FenetreJeu();
+		f.setVisible(true);
+		/*
+		TestFenetre f = new TestFenetre("Test");
+		//FenetreJeu f = new FenetreJeu("Test");
+		DialogueConnection md1 = new DialogueConnection(f);
+		md1.pack();
+		md1.setVisible(true);
+		while(!md1.isConnectionTerminee())
+		{
+			//
+		}
+		f = null;
+		Jeu j = new Jeu(new Carte(), md1.getId());
+		
+		int i;
+		for (i=0; i<md1.getJoueurs().size();i++)
+		{
+			Joueur temp = md1.getJoueurs().get(i);
+			j.ajouterJoueur(temp.getId(), temp.getNom(), temp.getR(), temp.getC());
+		}
+		j.ajouterJoueur(md1.getId(), "Toto", 1, 1);
+		
+		//System.out.println(j.getGrille().toString());
+		FenetreJeu fj = new FenetreJeu(j);
+		fj.setVisible(true);
+		//f.setVisible(true);
+		/*
+		if (md1.isValid())
+		{
+			System.out.println("Bo�te ok");
+		}
+		*/
+		
+		/*
+		//connexion
+		try
+		{
+			Socket s = new Socket(InetAddress.getByName("127.0.0.1"), 2332);
+			PrintWriter out = new PrintWriter(s.getOutputStream());
+			BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));
+			System.out.println("Connexion au serveur...");
+			String reponse = in.readLine();
+			ArrayList<Joueur> list_j;
+			list_j = new ArrayList<Joueur>();
+			int id=0;
+			if (Integer.parseInt(reponse)==0) {
+				System.out.println("Serveur Ok");
+				int i;
+				String nom = "toto";
+				String res;
+				out.println(nom);
+				res = in.readLine();
+				id = Integer.parseInt(res);
+				
+				res = in.readLine();
+				int nb_joueurs = Integer.parseInt(res);
+				if (nb_joueurs !=0) {
+					int id_j;
+					int r_j,c_j;
+					String nom_j;
+					for (i=0;i<nb_joueurs;i++) {
+						res = in.readLine();
+						id_j = Integer.parseInt(res);
+						
+						res = in.readLine();
+						nom_j = res;
+						
+						res = in.readLine();
+						r_j = Integer.parseInt(res);
+						
+						res = in.readLine();
+						c_j = Integer.parseInt(res);
+						list_j.add(new Joueur(id_j, nom_j, r_j, c_j));
+					}
+				}
+				list_j.add(new Joueur(id, nom, 1, 1));
+				
+			}
+			s.close();
+			
+			Jeu j = new Jeu(new Carte() ,id);
+			int i;
+			for (i=0; i<list_j.size(); i++) {
+				j.ajouterJoueur(list_j.get(i).getId(), 
+								list_j.get(i).getNom(), 
+								list_j.get(i).getR(), 
+								list_j.get(i).getC());
+				//
+			}
+			FenetreJeu fj = new FenetreJeu(j.getGrille());
+			//FenetreJeu.setGrille(Jeu.getGrille());
+		}
+		catch (IOException e)
+		{
+			//
+		}*/
+
+	}
+
+}

File ClientReseau/src/client/ThreadConnection.java

+package client;
+
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.Socket;
+import java.util.ArrayList;
+
+/*
+ * Ce Thread récupère toutes les informations concernant la partie
+ */
+public class ThreadConnection extends Thread {
+
+	private Socket s;
+	private InputStream in;
+	private OutputStream out;
+	private String jeton;
+	private char type;
+	private String nom;
+	
+	private int id_joueur;
+	private ArrayList<Joueur> joueurs;
+	
+	public ThreadConnection(Socket s, String j, char t, String nom)  throws IOException{
+		// TODO Auto-generated constructor stub
+		this.s = s;
+		this.jeton = j;
+		this.type = t;
+		this.nom = nom;
+		in = s.getInputStream();
+		//out = new DataOutputStream(s.getOutputStream());
+		out = s.getOutputStream();
+	}
+	
+	public void run() {
+		/*
+		 protocole:
+		 send nom
+		 receive id
+		 receive grille
+		 receive nb_joueur
+		 pour chaque joueur
+		 	receive id
+		 	receive x, y
+		 */
+		try {
+			joueurs = new ArrayList<Joueur>();
+			System.out.println("D�but envoi sur "+s.toString());
+			//out.writeInt(3);
+			String msg = jeton + ":" + type + ":" + nom;
+			System.out.println("Envoi vers "+s.toString()+": "+msg);
+			out.write(msg.getBytes());
+			byte[] b = new byte[1024];
+			in.read(b);
+			String rep = new String(b);
+			System.out.println("Recu: "+rep);
+			String[] tab_rep = rep.split("\\|");
+			int k;
+			for (k=0;k<tab_rep.length;k++)
+				System.out.println(tab_rep[k]);
+			if (tab_rep[1].equals("ok"))
+			{
+				String info = tab_rep[2];
+				System.out.println(info);
+				String[] res = info.split("@");
+				//System.out.println(res.toString());
+				id_joueur = Integer.parseInt(res[0]);
+				String[] coordonnees = res[1].split(",");
+				int r = Integer.parseInt(coordonnees[0]);
+				int c = Integer.parseInt(coordonnees[1]);
+				
+				System.out.println("ThreadConnection: Ajout "+id_joueur+" "+r+","+c);
+				this.joueurs.add(new Joueur(id_joueur, type, nom, r, c));
+				
+				String[] t_joueurs = res[2].split(";");
+				int i;
+				int id_j, r_j, c_j;
+				char t_j;
+				String nom_j;
+				for (i=0;i<t_joueurs.length;i++)
+				{
+					String[] info_j = t_joueurs[i].split(":");
+					id_j = Integer.parseInt(info_j[0]);
+					t_j = info_j[2].charAt(0);
+					nom_j = info_j[1];
+					String[] co_j = info_j[3].split(",");
+					r_j = Integer.parseInt(co_j[0]);
+					c_j = Integer.parseInt(co_j[1]);
+					System.out.println("ThreadConnection: Ajout "+id_j+" "+t_j+" "+nom_j+" "+r_j+","+c_j);
+					this.joueurs.add(new Joueur(id_j, t_j, nom_j, r_j, c_j));
+				}
+				in.close();
+				out.close();
+				System.out.println("Fin envoi sur "+s.toString());
+			}
+			else
+			{
+				System.out.println("Probl�me connection: reponse negative");
+			}
+		}
+		catch (IOException e) {
+			System.out.println("Probl�me envoi: "+e.toString());
+			e.printStackTrace();
+		}
+		finally {
+			try {
+				System.out.println("ThreadConnexion: Fermeture socket...");
+				s.close();
+				System.out.println("ThreadConnexion: Fermeture socket termin�e");
+			}
+			catch (IOException e) {
+				System.out.println("Probleme fermeture socket.");
+			}
+		}
+	}
+
+	public int getId_joueur() {
+		return id_joueur;
+	}
+
+	public ArrayList<Joueur> getJoueurs() {
+		return joueurs;
+	}
+
+}

File ClientReseau/src/client/ThreadConnexionPrinc.java

+package client;
+
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.Socket;
+import java.util.ArrayList;
+
+public class ThreadConnexionPrinc extends Thread {
+	private String msg;
+	
+	private String[] res;
+	
+	public ThreadConnexionPrinc(String msg) throws IOException {
+		// TODO Auto-generated constructor stub
+		this.msg = msg;
+	}
+	
+	public void run() {
+		System.out.println("split de "+msg);
+		res = msg.split(";");
+	}
+
+	public String[] getRes() {
+		return res;
+	}
+
+	/*
+	public void setRes(String res) {
+		this.res = res;
+	}
+	*/
+
+}

File ClientReseau/src/client/ThreadEcouteServeurUDP.java

+package client;
+
+import java.io.IOException;
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+import java.net.InetAddress;
+
+public class ThreadEcouteServeurUDP extends Thread {
+	private DatagramSocket s;
+	
+	private FenetreJeu fen;
+	private boolean stop;
+
+	public ThreadEcouteServeurUDP(DatagramSocket s,
+			FenetreJeu fen) {
+		super();
+		this.s = s;
+		this.fen = fen;
+		stop = false;
+	}
+	
+	public void Stopper()
+	{
+		s.close();
+		stop = true;
+	}
+
+	public void run() {
+		try
+		{
+			byte[] buf = new byte[256];
+			DatagramPacket packet = new DatagramPacket(buf, buf.length);
+			while(!stop)
+			{
+				s.receive(packet);
+				String rec = new String(packet.getData());
+				System.out.println("UDP recu: "+rec+ "test");
+				String[] tab_r = rec.split(":");
+				if (tab_r[0].equals("MVT"))
+				{
+					int id, r, c;
+					id = Integer.parseInt(tab_r[1]);
+					r = Integer.parseInt(tab_r[2]);
+					c = Integer.parseInt(tab_r[3]);
+					fen.getJeu().deplacerJoueur(id, r, c);
+				}
+				else
+				if (tab_r[0].equals("NEW"))
+				{
+					int id, r, c;
+					char t;
+					String nom;
+					id = Integer.parseInt(tab_r[1]);
+					nom = tab_r[2];
+					t = tab_r[3].charAt(0);
+					r = Integer.parseInt(tab_r[4]);
+					c = Integer.parseInt(tab_r[5]);
+					fen.getJeu().ajouterJoueur(id, t, nom, r, c);
+				}
+				else
+				if (tab_r[0].equals("DEC"))
+				{
+					int id;
+					id = Integer.parseInt(tab_r[1].split("0")[0]);
+					fen.getJeu().supprimerJoueur(id);
+				}
+			}
+		}
+		catch (IOException e)
+		{
+			System.out.println(e.toString());
+		}
+	}
+}

File ClientReseau/src/client/ThreadEnvoiUDP.java

+package client;
+
+import java.io.IOException;
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+import java.net.InetAddress;
+
+public class ThreadEnvoiUDP extends Thread {
+
+	private InetAddress ip;
+	private int port;
+	private String msg;
+	
+	public ThreadEnvoiUDP(InetAddress ip, int port, String msg) {
+		super();
+		this.ip = ip;
+		this.port = port;
+		this.msg = msg;
+	}
+	
+	public void run()
+	{
+		try
+		{
+			DatagramSocket s = new DatagramSocket();
+			byte[] buf = msg.getBytes();
+			DatagramPacket packet = new DatagramPacket(buf, buf.length, ip, port);
+			System.out.println("Envoi UDP: "+msg);
+			s.send(packet);
+		}
+		catch (IOException ex)
+		{
+			System.out.println("probleme envoi udp");
+			ex.printStackTrace();
+		}
+	}
+
+}

File ClientReseau/src/client/ThreadLogin.java

+package client;
+
+import java.io.BufferedReader;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.net.Socket;
+
+public class ThreadLogin extends Thread {
+	private Socket s;
+	private InputStream in;
+	private OutputStream out;
+	private boolean register;
+	private String login;
+	private String password;
+	private String reponse;
+
+	public String getReponse() {
+		return reponse;
+	}
+
+	public void setReponse(String reponse) {
+		this.reponse = reponse;
+	}
+
+	public ThreadLogin(Socket s, String login, String password, boolean register) throws IOException {
+		// TODO Auto-generated constructor stub
+		this.s = s;
+		//in = new DataInputStream(s.getInputStream());
+		//out = new DataOutputStream(s.getOutputStream());
+		out = s.getOutputStream();
+		in = s.getInputStream();
+		//in  = new BufferedReader (new InputStreamReader(s.getInputStream()));
+
+		this.register = register;
+		this.login = login;
+		this.password = password;
+	}
+	
+	public void run()
+	{
+		System.out.println("ThreadLogin: lancement "+login+","+password+","+register +
+				" sur"+s.toString());
+		String msg;
+		if (register)
+		{
+			msg = "register:";
+		}
+		else
+		{
+			msg = "connect:";
+		}
+		msg += login + ":" + password;
+		try
+		{
+			System.out.println("ThreadLogin: envoi "+msg);
+			//out.writeUTF(msg);
+			out.write(msg.getBytes());
+			//out.write(msg.getBytes());
+			//reponse = in.readUTF();
+			byte[] b = new byte[64];
+			in.read(b);
+			//in.read(c);
+			reponse = new String(b);
+			System.out.println("ThreadLogin: reception "+reponse);
+		}
+		catch (IOException ex)
+		{
+			//
+		}
+	}
+}

File serveurPartie/Debug/game.d

+game.d game.o: ../game.cpp ../game.h ../joueur.h ../threads.h \
+  ../md5/md5.h
+
+../game.h:
+
+../joueur.h:
+
+../threads.h:
+
+../md5/md5.h:

File serveurPartie/Debug/game.o

Binary file added.

File serveurPartie/Debug/joueur.d

+joueur.d joueur.o: ../joueur.cpp ../joueur.h
+
+../joueur.h:

File serveurPartie/Debug/joueur.o

Binary file added.

File serveurPartie/Debug/main.d

+main.d main.o: ../main.cpp ../game.h ../joueur.h ../threads.h
+
+../game.h:
+
+../joueur.h:
+
+../threads.h:

File serveurPartie/Debug/main.o

Binary file added.

File serveurPartie/Debug/makefile

+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+-include ../makefile.init
+
+RM := rm -rf
+
+# All of the sources participating in the build are defined here
+-include sources.mk
+-include subdir.mk
+-include md5/subdir.mk
+-include objects.mk
+
+ifneq ($(MAKECMDGOALS),clean)
+ifneq ($(strip $(C++_DEPS)),)
+-include $(C++_DEPS)
+endif
+ifneq ($(strip $(C_DEPS)),)
+-include $(C_DEPS)
+endif
+ifneq ($(strip $(CC_DEPS)),)
+-include $(CC_DEPS)
+endif
+ifneq ($(strip $(CPP_DEPS)),)
+-include $(CPP_DEPS)
+endif
+ifneq ($(strip $(CXX_DEPS)),)
+-include $(CXX_DEPS)
+endif
+ifneq ($(strip $(C_UPPER_DEPS)),)
+-include $(C_UPPER_DEPS)
+endif
+endif
+
+-include ../makefile.defs
+
+# Add inputs and outputs from these tool invocations to the build variables 
+
+# All Target
+all: serveurPartie
+
+# Tool invocations
+serveurPartie: $(OBJS) $(USER_OBJS)
+	@echo 'Building target: $@'
+	@echo 'Invoking: GCC C++ Linker'
+	g++ -lpthread  -o"serveurPartie" $(OBJS) $(USER_OBJS) $(LIBS)
+	@echo 'Finished building target: $@'
+	@echo ' '
+
+# Other Targets
+clean:
+	-$(RM) $(OBJS)$(C++_DEPS)$(C_DEPS)$(CC_DEPS)$(CPP_DEPS)$(EXECUTABLES)$(CXX_DEPS)$(C_UPPER_DEPS) serveurPartie
+	-@echo ' '
+
+.PHONY: all clean dependents
+.SECONDARY:
+
+-include ../makefile.targets

File serveurPartie/Debug/md5/md5.d

+md5/md5.d md5/md5.o: ../md5/md5.c ../md5/md5.h
+
+../md5/md5.h:

File serveurPartie/Debug/md5/md5.o

Binary file added.

File serveurPartie/Debug/md5/md5main.d

+md5/md5main.d md5/md5main.o: ../md5/md5main.c

File serveurPartie/Debug/md5/md5main.o

Binary file added.

File serveurPartie/Debug/md5/subdir.mk

+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables 
+C_SRCS += \
+../md5/md5.c \
+../md5/md5main.c 
+
+OBJS += \
+./md5/md5.o \
+./md5/md5main.o 
+
+C_DEPS += \
+./md5/md5.d \
+./md5/md5main.d 
+
+
+# Each subdirectory must supply rules for building sources it contributes
+md5/%.o: ../md5/%.c
+	@echo 'Building file: $<'
+	@echo 'Invoking: GCC C Compiler'
+	gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<"
+	@echo 'Finished building: $<'
+	@echo ' '
+
+

File serveurPartie/Debug/objects.mk

+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+USER_OBJS :=
+
+LIBS :=

File serveurPartie/Debug/serveurPartie

Binary file added.

File serveurPartie/Debug/sources.mk

+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+O_SRCS := 
+CPP_SRCS := 
+C_UPPER_SRCS := 
+C_SRCS := 
+S_SRCS := 
+OBJ_SRCS := 
+ASM_SRCS := 
+CXX_SRCS := 
+C++_SRCS := 
+CC_SRCS := 
+OBJS := 
+C++_DEPS := 
+C_DEPS := 
+CC_DEPS := 
+CPP_DEPS := 
+EXECUTABLES := 
+CXX_DEPS := 
+C_UPPER_DEPS := 
+
+# Every subdirectory with source files must be described here
+SUBDIRS := \
+md5 \
+. \
+

File serveurPartie/Debug/subdir.mk

+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables 
+CPP_SRCS += \
+../game.cpp \
+../joueur.cpp \
+../main.cpp 
+
+OBJS += \
+./game.o \
+./joueur.o \
+./main.o 
+
+CPP_DEPS += \
+./game.d \
+./joueur.d \
+./main.d 
+
+
+# Each subdirectory must supply rules for building sources it contributes
+%.o: ../%.cpp
+	@echo 'Building file: $<'
+	@echo 'Invoking: GCC C++ Compiler'
+	g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<"
+	@echo 'Finished building: $<'
+	@echo ' '
+
+

File serveurPartie/documentation/Doxyfile

+# Doxyfile 1.5.4
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+DOXYFILE_ENCODING      = UTF-8
+PROJECT_NAME           = "Serveur de partie"
+PROJECT_NUMBER         = 
+OUTPUT_DIRECTORY       = /home/cedric/workspace/serveurPartie/documentation/
+CREATE_SUBDIRS         = NO
+OUTPUT_LANGUAGE        = English
+BRIEF_MEMBER_DESC      = YES
+REPEAT_BRIEF           = YES
+ABBREVIATE_BRIEF       = "The $name class" \