Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProjetZZ1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marc BERET
ProjetZZ1
Commits
c8591fe5
Commit
c8591fe5
authored
2 years ago
by
maberet
Browse files
Options
Downloads
Patches
Plain Diff
modif Markov
parent
6e6fd333
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
travail_de_groupe/chef_oeuvre/src/fire.c
+4
-7
4 additions, 7 deletions
travail_de_groupe/chef_oeuvre/src/fire.c
with
4 additions
and
7 deletions
travail_de_groupe/chef_oeuvre/src/fire.c
+
4
−
7
View file @
c8591fe5
...
...
@@ -161,7 +161,6 @@ void nextFire(listchainfire_t listFire){
int
pSparkle
;
int
pMedium
;
int
pStrong
;
int
pSpread
;
listchainfire_t
listTemporary
;
listTemporary
=
listFire
;
...
...
@@ -179,13 +178,11 @@ void nextFire(listchainfire_t listFire){
pStrong
=
(
markov
[
state
][
SPARKLE
]
+
markov
[
state
][
DEAD
]
+
markov
[
state
][
MEDIUM
]
+
markov
[
state
][
STRONG
])
*
100
;
pSpread
=
(
markov
[
state
][
SPARKLE
]
+
markov
[
state
][
DEAD
]
+
markov
[
state
][
MEDIUM
]
+
markov
[
state
][
STRONG
]
+
markov
[
state
][
SPREAD
])
*
100
;
if
(
0
<=
probability
<
pDead
){(
listTemporary
->
fire
).
state
=
DEAD
;}
else
if
(
pDead
<=
probability
<
pSparkle
){(
listTemporary
->
fire
).
state
=
SPARKLE
;}
else
if
(
pSparkle
<=
probability
<
pMedium
){(
listTemporary
->
fire
).
state
=
MEDIUM
;}
else
if
(
pMedium
<=
probability
<
pStrong
){(
listTemporary
->
fire
).
state
=
STRONG
;}
if
(
(
0
<=
probability
)
&&
(
probability
<
pDead
)
)
{(
listTemporary
->
fire
).
state
=
DEAD
;}
else
if
(
(
pDead
<=
probability
)
&&
(
probability
<
pSparkle
)
)
{(
listTemporary
->
fire
).
state
=
SPARKLE
;}
else
if
(
(
pSparkle
<=
probability
)
&&
(
probability
<
pMedium
)
)
{(
listTemporary
->
fire
).
state
=
MEDIUM
;}
else
if
(
(
pMedium
<=
probability
)
&&
(
probability
<
pStrong
)
)
{(
listTemporary
->
fire
).
state
=
STRONG
;}
else
{(
listTemporary
->
fire
).
state
=
SPREAD
;}
listTemporary
=
listTemporary
->
next
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment