mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-05-07 06:39:38 +02:00
move legacy code to separate branch
This commit is contained in:
parent
68a30c8ee6
commit
11b4c48c3a
3528 changed files with 14477 additions and 53258 deletions
16
Data/ingsw/0721_18/correct.txt
Normal file
16
Data/ingsw/0721_18/correct.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
<pre>
|
||||
model Env
|
||||
Integer x; // Pulsante premuto dall'utente
|
||||
Real r1024;
|
||||
Integer state1024[Modelica.Math.Random.Generators.Xorshift1024star.nState];
|
||||
algorithm
|
||||
when initial() then
|
||||
state1024 := Modelica.Math.Random.Generators.Xorshift1024star.initialState(614657, 30020);
|
||||
x := 0;
|
||||
r1024 := 0;
|
||||
elsewhen sample(0,1) then
|
||||
(r1024,state1024) := Modelica.Math.Random.Generators.Xorshift1024star.random(pre(state1024));
|
||||
if (r1024 <= 0.6) then x := 0; else x := 1; end if;
|
||||
end when;
|
||||
end Env;
|
||||
</pre>
|
Loading…
Add table
Add a link
Reference in a new issue