Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
726199cb14
2 changed files with 100 additions and 1 deletions
100
merde.soil
Normal file
100
merde.soil
Normal file
|
@ -0,0 +1,100 @@
|
|||
!Bataille := new Jeu
|
||||
|
||||
!j1 := new Joueur
|
||||
!set j1.nom := 'Alpha'
|
||||
|
||||
!j2 := new Joueur
|
||||
!set j2.nom := 'Beta'
|
||||
|
||||
!Bataille.nom1 := j1.nom
|
||||
!Bataille.nom2 := j2.nom
|
||||
|
||||
!j1.plateau_attaque := new Plateau
|
||||
!j1.plateau_defense := new Plateau
|
||||
!j2.plateau_attaque := new Plateau
|
||||
!j2.plateau_defense := new Plateau
|
||||
|
||||
!flotte_j1 := new Flotte
|
||||
!flotte_j2 := new Flotte
|
||||
|
||||
!j1.flotte := flotte_j1
|
||||
!j2.flotte := flotte_j2
|
||||
|
||||
!j1.flotte.ajouterBateau{bateau1_j1}
|
||||
|
||||
-- ,bateau2_j1,bateau3_j1,bateau4_j1
|
||||
-- Bateau Joueur1
|
||||
!bateau1_j1 := new Bateau
|
||||
!bateau1_j1.type := TypeBateau::Torpilleur
|
||||
!bateau1_j1.longueur := 2
|
||||
!bateau1_j1.etat := EtatBateau::Operationnel
|
||||
!bateau1_j1.x1 := 1
|
||||
!bateau1_j1.y1 := 1
|
||||
!bateau1_j1.x2 := 2
|
||||
!bateau1_j1.y2 := 1
|
||||
|
||||
!bateau2_j1 := new Bateau
|
||||
!bateau2_j1.type := TypeBateau::Croiseur
|
||||
!bateau2_j1.longueur := 4
|
||||
!bateau2_j1.etat := EtatBateau::Operationnel
|
||||
!bateau2_j1.x1 := 3
|
||||
!bateau2_j1.y1 := 3
|
||||
!bateau2_j1.x2 := 3
|
||||
!bateau2_j1.y2 := 6
|
||||
|
||||
!bateau3_j1 := new Bateau
|
||||
!bateau3_j1.type := TypeBateau::Contre_Torpilleur
|
||||
!bateau3_j1.longueur := 3
|
||||
!bateau3_j1.etat := EtatBateau::Operationnel
|
||||
!bateau3_j1.x1 := 6
|
||||
!bateau3_j1.y1 := 1
|
||||
!bateau3_j1.x2 := 9
|
||||
!bateau3_j1.y2 := 1
|
||||
|
||||
!bateau4_j1 := new Bateau
|
||||
!bateau4_j1.type := TypeBateau::Porte_Avions
|
||||
!bateau4_j1.longueur := 5
|
||||
!bateau4_j1.etat := EtatBateau::Operationnel
|
||||
!bateau4_j1.x1 := 5
|
||||
!bateau4_j1.y1 := 9
|
||||
!bateau4_j1.x2 := 9
|
||||
!bateau4_j1.y2 := 9
|
||||
|
||||
-- Bateau Joueur2
|
||||
!bateau1_j2_j1 := new Bateau
|
||||
!bateau1_j2_j1.type := TypeBateau::Torpilleur
|
||||
!bateau1_j2_j1.longueur := 2
|
||||
!bateau1_j2_j1.etat := EtatBateau::Operationnel
|
||||
!bateau1_j2_j1.x1 := 2
|
||||
!bateau1_j2_j1.y1 := 2
|
||||
!bateau1_j2_j1.x2 := 3
|
||||
!bateau1_j2_j1.y2 := 2
|
||||
|
||||
!bateau2_j2 := new Bateau
|
||||
!bateau2_j2.type := TypeBateau::Croiseur
|
||||
!bateau2_j2.longueur := 4
|
||||
!bateau2_j2.etat := EtatBateau::Operationnel
|
||||
!bateau2_j2.x1 := 4
|
||||
!bateau2_j2.y1 := 4
|
||||
!bateau2_j2.x2 := 4
|
||||
!bateau2_j2.y2 := 7
|
||||
|
||||
!bateau3_j2 := new Bateau
|
||||
!bateau3_j2.type := TypeBateau::Contre_Torpilleur
|
||||
!bateau3_j2.longueur := 3
|
||||
!bateau3_j2.etat := EtatBateau::Operationnel
|
||||
!bateau3_j2.x1 := 5
|
||||
!bateau3_j2.y1 := 1
|
||||
!bateau3_j2.x2 := 8
|
||||
!bateau3_j2.y2 := 1
|
||||
|
||||
!bateau4_j2 := new Bateau
|
||||
!bateau4_j2.type := TypeBateau::Porte_Avions
|
||||
!bateau4_j2.longueur := 5
|
||||
!bateau4_j2.etat := EtatBateau::Operationnel
|
||||
!bateau4_j2.x1 := 5
|
||||
!bateau4_j2.y1 := 6
|
||||
!bateau4_j2.x2 := 9
|
||||
!bateau4_j2.y2 := 6
|
||||
|
||||
!
|
|
@ -193,4 +193,3 @@ association Repartit between
|
|||
Case[2..5] role cases
|
||||
Bateau[0..1] role bateau
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue