mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-05-06 16:19:38 +02:00
Adapt to new bot structure
This commit is contained in:
parent
ff7e08ada9
commit
3f84e1d831
3414 changed files with 41525 additions and 709 deletions
22
legacy/Data/ingsw/44/wrong.txt
Normal file
22
legacy/Data/ingsw/44/wrong.txt
Normal file
|
@ -0,0 +1,22 @@
|
|||
<pre>
|
||||
block MarkovChain
|
||||
//external function myrandom() returns a random real number in [0, 1]
|
||||
parameter Integer x0 = 0;
|
||||
parameter Integer xmax = 100;
|
||||
OutputInteger x; // Connector
|
||||
algorithm
|
||||
when initial() then
|
||||
x := x0;
|
||||
elsewhen sample(0, 1) then
|
||||
if (x < xmax)
|
||||
then
|
||||
if (myrandom() <= 0.8)
|
||||
then
|
||||
x := x + 1;
|
||||
else
|
||||
x := x - 1;
|
||||
end if;
|
||||
end if;
|
||||
end when;
|
||||
end MarkovChain
|
||||
</pre>
|
Loading…
Add table
Add a link
Reference in a new issue