Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
C
CaptainSonOz
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Conditions générales et politique de confidentialité
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Vany Ingenzi
CaptainSonOz
Validations
ab279a9a
Valider
ab279a9a
rédigé
3 years ago
par
Vany Ingenzi
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Fixed some bugs in the code
parent
95416266
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
4
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
4 fichiers modifiés
Main.oz
+7
-8
7 ajouts, 8 suppressions
Main.oz
Player020HiderAndSeeker.oz
+2
-2
2 ajouts, 2 suppressions
Player020HiderAndSeeker.oz
Player020Hunter.oz
+2
-2
2 ajouts, 2 suppressions
Player020Hunter.oz
Player020Random.oz
+0
-1
0 ajout, 1 suppression
Player020Random.oz
avec
11 ajouts
et
13 suppressions
Main.oz
+
7
−
8
Voir le fichier @
ab279a9a
...
...
@@ -17,7 +17,7 @@ define
of nil#nil then nil
[] (Player|OtherPlayers)#(Color|OtherColors) then
player(
port:{PlayerManager.playerGenerator Player Color
id(id:AccID color:Color name:Player)
}
port:{PlayerManager.playerGenerator Player Color
AccID
}
nbSurface: 0 %% All the players start underwater
)|{InitPlayers OtherPlayers OtherColors AccID+1}
end
...
...
@@ -37,7 +37,7 @@ define
fun {WeHaveAWinner Players Acc}
case Players of nil then Acc==1
[]Player|Others then Resp in
[]
Player|Others then Resp in
{Send Player.port isDead(Resp)}
if Resp==true then
{WeHaveAWinner Others Acc}
...
...
@@ -346,14 +346,13 @@ define
end
end
in
%%
1.
%%
Build the GUI Window
{Send GUI_PORT buildWindow}
%%
2.
Create Port for Every Player
%% Create Port for Every Player
PlayersList={InitPlayers Input.players Input.colors 1}
%%3. Ask Init Point and tell players to dive
%% Ask Init Point and tell players to dive
{VisitList PlayersList
proc{$ Player}
ID Pos
...
...
@@ -363,7 +362,7 @@ in
{Send Player.port dive}
end}
%%
4.
Launch the game
%% Launch the game
if Input.isTurnByTurn then
{TurnByTurn PlayersList 1}
{System.show '----'}
...
...
@@ -371,6 +370,6 @@ in
{List.forAll PlayersList proc{$ Player} thread {Simultaneous Player PlayersList} end end}
end
%%
5.
Termination
%% Termination
{List.forAll PlayersList proc{$ Player} {Send Player.port nil} end }
end
Ce diff est replié.
Cliquez pour l'agrandir.
Player020HiderAndSeeker.oz
+
2
−
2
Voir le fichier @
ab279a9a
...
...
@@ -495,13 +495,13 @@ define
in
{NewPort Stream Port}
thread
{AliveTreatStream Stream '#'( id:
ID
{AliveTreatStream Stream '#'( id:
id(id:ID color:Color name:player020hunter)
life:Input.maxDamage
pos:pt(x:0 y:0)
chargingItems:[ {GetNewChargeFireItem drone} {GetNewChargeFireItem missile} {GetNewChargeFireItem missile} ]
chargedItems:nil
targets:nil
enemies:{InitEnemies ID
.id
Input.nbPlayer nil}
enemies:{InitEnemies ID Input.nbPlayer nil}
history:nil
droneLogs:nil
absHistory:nil)}
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Player020Hunter.oz
+
2
−
2
Voir le fichier @
ab279a9a
...
...
@@ -420,14 +420,14 @@ define
in
{NewPort Stream Port}
thread
{AliveTreatStream Stream '#'( id:
ID
{AliveTreatStream Stream '#'( id:
id(id:ID color:Color name:player020hunter)
life:Input.maxDamage
pos:pt(x:0 y:0)
chargingItems:{InitChargingItemsMissile Input.nbPlayer nil}
chargedItems:nil
placedMines:nil
targets:nil
enemies:{InitEnemies ID
.id
Input.nbPlayer nil}
enemies:{InitEnemies ID Input.nbPlayer nil}
history:nil)}
end
Port
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Player020Random.oz
+
0
−
1
Voir le fichier @
ab279a9a
...
...
@@ -352,7 +352,6 @@ define
in
{NewPort Stream Port}
thread
{AliveTreatStream Stream '#'( id:ID
life:Input.maxDamage
pos:pt(x:0 y:0)
chargingItems:[ {GetNewChargeFireItem mine} {GetNewChargeFireItem missile}
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter