diff --git a/projet.use b/projet.use index a51e2e8..ae7ebdb 100644 --- a/projet.use +++ b/projet.use @@ -61,9 +61,12 @@ attributes type: TypeCase operations changerEtat(nouveauEtat: TypeCase) - getEtat(): TypeCase -constraints - inv coordonne: x <= 10 and x > 0 and y > 0 and y <= 10 + getEtat(): TypeCase +constraints + inv: + plateau.cases->select(c: Case | c.x = x and c.y = y)->size() = 1 + inv: + coordonne: x <= 10 and x > 0 and y > 0 and y <= 10 end class Bateau diff --git a/projet_default.clt b/projet_default.clt index 9498a52..3b9328c 100644 --- a/projet_default.clt +++ b/projet_default.clt @@ -206,29 +206,18 @@ false - - plateau + 0.0 0.0 Compose::WayPoint::1 8 8 - TOP + BOTTOM false - - Compose - - 0.0 - 0.0 - 0.0 - -10.0 - - Compose::WayPoint::0 - Compose::WayPoint::1 - + false @@ -286,20 +275,7 @@ Coup Etat - - coup - - 0.0 - 0.0 - Etat::WayPoint::1 - 8 - 8 - TOP - - false - - - 1 + 0.0 0.0 @@ -310,6 +286,18 @@ false + + coup + + 18.0 + 21.0 + Etat::WayPoint::1 + 8 + 8 + TOP + + false + Etat @@ -378,20 +366,7 @@ Flotte Appartient - - flotte - - 0.0 - 0.0 - Appartient::WayPoint::1 - 8 - 8 - TOP - - false - - - 1 + 0.0 0.0 @@ -402,6 +377,18 @@ false + + flotte + + 105.0 + 0.0 + Appartient::WayPoint::1 + 8 + 8 + TOP + + false + Appartient @@ -508,20 +495,7 @@ false - - joueur - - 0.0 - 0.0 - Utilise::WayPoint::0 - 8 - 8 - TOP - - false - - - 1 + 0.0 0.0 @@ -532,6 +506,18 @@ false + + joueur + + -16.0 + -10.0 + Utilise::WayPoint::0 + 8 + 8 + TOP + + false + @@ -574,29 +560,19 @@ false - - 1 + + jeu1 0.0 0.0 Joue2::WayPoint::1 8 8 - BOTTOM + TOP false - - Joue2 - - 0.0 - 0.0 - 0.0 - -10.0 - - Joue2::WayPoint::0 - Joue2::WayPoint::1 - + false @@ -662,7 +638,7 @@ Bateau Appartient2 - + bateaux 0.0 @@ -674,12 +650,12 @@ false - - * + + 1 0.0 0.0 - Appartient2::WayPoint::1 + Appartient2::WayPoint::0 8 8 BOTTOM @@ -712,18 +688,6 @@ false - - 1 - - 0.0 - 0.0 - Appartient2::WayPoint::0 - 8 - 8 - BOTTOM - - false - @@ -792,7 +756,7 @@ false - + joueur1 14.0