Saataa andagii !

This commit is contained in:
Lukian 2024-11-18 11:16:56 +01:00
parent 4775a751ab
commit 578575512c
2 changed files with 117 additions and 0 deletions

73
projet.use Normal file
View file

@ -0,0 +1,73 @@
model projet_bataille_navale
enum TypeCase {
Vide,
Bateau,
Touche,
Rate
}
enum TypeBateau {
Torpilleur,
Contre_Torpilleur,
Croiseur,
Porte_Avions
}
enum TypeCoup {
Rate,
Touche,
Touche_Coule
}
enum EtatBateau {
Operationnel,
Coule
}
class Jeu
operations
init(nom1: String,nom2: String): void
debut(): void
end
class Joueur
attributes
Nom: String
operations
tirer(case: String): TypeCoup
tirerRobot(): TypeCoup
end
class Flotte
operations
ajouterBateau(bateau: Bateau): void
end
class TypeCoup
attributes
type: TypeCoup
end
class Plateau
operations
afficherPlateau(CacherBateaux: Boolean): void
end
class Case
attributes
x: Integer
y: Integer
type: TypeCase
operations
changerEtat(nouveauEtat: TypeCase): void
getEtat(): TypeCase
end
class Bateau
attributes
type: TypeBateau
longueur: Integer
Etat: EtatBateau
end