From 578575512c8e033b78c466ccbbacb147b7aae793 Mon Sep 17 00:00:00 2001 From: Lukian Date: Mon, 18 Nov 2024 11:16:56 +0100 Subject: [PATCH] Saataa andagii ! --- projet.use | 73 ++++++++++++++++++++++++++++++++++++++++++++++ projet_default.clt | 44 ++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 projet.use create mode 100644 projet_default.clt diff --git a/projet.use b/projet.use new file mode 100644 index 0000000..6e21614 --- /dev/null +++ b/projet.use @@ -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 + diff --git a/projet_default.clt b/projet_default.clt new file mode 100644 index 0000000..0053bca --- /dev/null +++ b/projet_default.clt @@ -0,0 +1,44 @@ + + + false + false + false + true + false + false + true + false + + + TypeCoup + + 600.0 + 303.0 + + false + + + TypeCase + + 598.0 + 68.0 + + false + + + EtatBateau + + 599.0 + 403.0 + + false + + + TypeBateau + + 601.0 + 184.0 + + false + +