diff --git a/Main.oz b/Main.oz index 374cea9d245fa37c886b03b6a8e6370c8f5a5eed..782f742f72a29b8197209418c2793f5bae9e330c 100644 --- a/Main.oz +++ b/Main.oz @@ -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 diff --git a/Player020HiderAndSeeker.oz b/Player020HiderAndSeeker.oz index b1f8a429555a71bb976ead7b67fcf065963cb03c..6aae259e70f14840b59e4cf3dae36cc4d78b8a69 100644 --- a/Player020HiderAndSeeker.oz +++ b/Player020HiderAndSeeker.oz @@ -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)} diff --git a/Player020Hunter.oz b/Player020Hunter.oz index d21634426f7dc4d538d02f9e8b9e1272b328a146..89a666beea45c5d6d7aa0b9f626ab63dc6d24a4c 100644 --- a/Player020Hunter.oz +++ b/Player020Hunter.oz @@ -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 diff --git a/Player020Random.oz b/Player020Random.oz index 2d8e049fbfaf797fbae9df9d9cd2b5e4e12f75b6..99482a3602de716e3f83b4b343e9d86ece25bd0d 100644 --- a/Player020Random.oz +++ b/Player020Random.oz @@ -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}