All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class navalBattle.VectorTir

java.lang.Object
   |
   +----java.rmi.server.RemoteObject
           |
           +----java.rmi.server.RemoteServer
                   |
                   +----java.rmi.server.UnicastRemoteObject
                           |
                           +----navalBattle.VectorTir

public class VectorTir
extends UnicastRemoteObject
implements VectorTireur
C'est l'objet distant RMI! Il imlemente l'interface rmi.VectorTireur Tous les joueurs le consultent et le mettent a jour

Author:
Constantin Roattino
See Also:
VectorTireur, VectorTir

Variable Index

 o compteur
 o nbJoueurs
 o nbMAJFlotte
 o nbQuiAJoue
 o perdants
 o tourCourant
 o vTir

Constructor Index

 o VectorTir()
VectorTir constructor comment.
 o VectorTir(int)

Method Index

 o getCible(int)
 o getIdent()
 o getMessageCouleTir(int)
 o getNbJoueurs()
 o getNbMAJFlotte()
donne le nombre de joueurs qui ont lis a jour leur flotte
 o getNbQuiAJoue()
donne le nombre de joueurs qui ont tiré
 o getTir(int)
donne le tir du joueur numero idTir
 o getTourCourant()
 o getTourCourantTir(int)
donne le tour courant du joueur idTir
 o getVictime(int, int)
donne la liste des victimes du joueur idVictime pour le tir idTir
 o incNbMAJFlotte()
incremente le nombre de joueur qui ont mis a jour leur flotte.
 o incNbQuiAJoue()
incremente le nombre de joueurs qui ont joue.
 o incScore(int, int)
incremente le score de inc pour le joueur ayant le tir : idTir
 o incTourCourant()
incremente le tour courant.
 o incTourCourantTir(int)
incremente le tour courant du tir : idTir
 o perdant(int)
Quand un joueur n'a plus de bateau il lance cette methode le VectorTir simulera ses tirs
 o setCible(int, Point)
 o setMessageCouleTir(int, String)
 o setNbJoueurs(int)
 o setTir(int, Tir)
 o setTouche(int, int)
.
 o setVictime(int, int, Victime)
 o touche(int, int, Case, String)
 o zeroNbMAJFlotte()
remet a zero le nombre de joueur qui ont mis a jour leur flotte et additionne le nombre de joueurs qui ont deja perdu
 o zeroNbQuiAJoue()
remet a zero le nombre de joueur qui ont tiré et additionne le nombre de joueurs qui ont deja perdu

Variables

 o nbJoueurs
 private int nbJoueurs
 o nbQuiAJoue
 private int nbQuiAJoue
 o nbMAJFlotte
 private int nbMAJFlotte
 o tourCourant
 private int tourCourant
 o compteur
 private int compteur
 o vTir
 private Vector vTir
 o perdants
 private Vector perdants

Constructors

 o VectorTir
 public VectorTir() throws RemoteException
VectorTir constructor comment.

Throws: RemoteException
The exception description.
 o VectorTir
 public VectorTir(int nbJ) throws RemoteException
Parameters:
nbJ - int

Methods

 o getCible
 public Point getCible(int idTir) throws RemoteException
Parameters:
idTir - int
Returns:
java.awt.Point
Throws: RemoteException
The exception description.
 o getIdent
 public int getIdent() throws RemoteException
Returns:
int
Throws: RemoteException
The exception description.
 o getMessageCouleTir
 public String getMessageCouleTir(int idTir) throws RemoteException
Parameters:
idTir - int
Returns:
java.lang.String
Throws: RemoteException
The exception description.
 o getNbJoueurs
 public int getNbJoueurs() throws RemoteException
 o getNbMAJFlotte
 public int getNbMAJFlotte() throws RemoteException
donne le nombre de joueurs qui ont lis a jour leur flotte

 o getNbQuiAJoue
 public int getNbQuiAJoue() throws RemoteException
donne le nombre de joueurs qui ont tiré

 o getTir
 public Tir getTir(int idTir) throws RemoteException
donne le tir du joueur numero idTir

 o getTourCourant
 public int getTourCourant() throws RemoteException
 o getTourCourantTir
 public int getTourCourantTir(int idTir) throws RemoteException
donne le tour courant du joueur idTir

Parameters:
idTir - int
Returns:
int
Throws: RemoteException
The exception description.
 o getVictime
 public Victime getVictime(int idTir,
                           int idVictime) throws RemoteException
donne la liste des victimes du joueur idVictime pour le tir idTir

Parameters:
idTir - int
idVictime - int
Returns:
navalBattle.Victime
Throws: RemoteException
The exception description.
 o incNbMAJFlotte
 public void incNbMAJFlotte() throws RemoteException
incremente le nombre de joueur qui ont mis a jour leur flotte.

 o incNbQuiAJoue
 public void incNbQuiAJoue() throws RemoteException
incremente le nombre de joueurs qui ont joue.

 o incScore
 public void incScore(int idTir,
                      int inc) throws RemoteException
incremente le score de inc pour le joueur ayant le tir : idTir

Parameters:
idTir - int
Throws: RemoteException
The exception description.
 o incTourCourant
 public void incTourCourant() throws RemoteException
incremente le tour courant. debut du nouveau tour

 o incTourCourantTir
 public void incTourCourantTir(int idTir) throws RemoteException
incremente le tour courant du tir : idTir

Parameters:
idTir - int
Throws: RemoteException
The exception description.
 o perdant
 public void perdant(int idTireur) throws RemoteException
Quand un joueur n'a plus de bateau il lance cette methode le VectorTir simulera ses tirs

Parameters:
idTireur - int
 o setCible
 public void setCible(int idTir,
                      Point cible) throws RemoteException
Parameters:
idTir - int
cible - java.awt.Point
Throws: RemoteException
The exception description.
 o setMessageCouleTir
 public void setMessageCouleTir(int idTir,
                                String msg) throws RemoteException
Parameters:
idTir - int
msg - java.lang.String
Throws: RemoteException
The exception description.
 o setNbJoueurs
 public void setNbJoueurs(int nbJ) throws RemoteException
 o setTir
 public void setTir(int idTir,
                    Tir tir) throws RemoteException
 o setTouche
 public void setTouche(int idTir,
                       int touch) throws RemoteException
.

Parameters:
touch - int
Throws: RemoteException
The exception description.
 o setVictime
 public void setVictime(int idTir,
                        int idVictime,
                        Victime v) throws RemoteException
Parameters:
idTir - int
idVictime - int
v - navalBattle.Victime
Throws: RemoteException
The exception description.
 o touche
 public void touche(int idTir,
                    int idProprio,
                    Case where,
                    String type) throws RemoteException
Parameters:
idTir - int
idProprio - int
where - navalBattle.Case
type - java.lang.String
Throws: RemoteException
The exception description.
 o zeroNbMAJFlotte
 public void zeroNbMAJFlotte() throws RemoteException
remet a zero le nombre de joueur qui ont mis a jour leur flotte et additionne le nombre de joueurs qui ont deja perdu

Throws: RemoteException
The exception description.
 o zeroNbQuiAJoue
 public void zeroNbQuiAJoue() throws RemoteException
remet a zero le nombre de joueur qui ont tiré et additionne le nombre de joueurs qui ont deja perdu

Throws: RemoteException
The exception description.

All Packages  Class Hierarchy  This Package  Previous  Next  Index