Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
big-brain
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
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
Louis
big-brain
Commits
e857fcf0
Unverified
Commit
e857fcf0
authored
4 years ago
by
Kat Marchán
Browse files
Options
Downloads
Patches
Plain Diff
no need to re-instantiate a score
parent
54937950
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+1
-1
1 addition, 1 deletion
README.md
examples/thirst.rs
+1
-1
1 addition, 1 deletion
examples/thirst.rs
with
2 additions
and
2 deletions
README.md
+
1
−
1
View file @
e857fcf0
...
@@ -31,7 +31,7 @@ pub fn score_thirst_system(
...
@@ -31,7 +31,7 @@ pub fn score_thirst_system(
)
{
)
{
for
(
Parent
(
actor
),
mut
score
)
in
query
.iter_mut
()
{
for
(
Parent
(
actor
),
mut
score
)
in
query
.iter_mut
()
{
if
let
Ok
(
thirst
)
=
thirsts
.get
(
*
actor
)
{
if
let
Ok
(
thirst
)
=
thirsts
.get
(
*
actor
)
{
*
score
=
Score
(
thirst
.thirst
)
;
score
.0
=
thirst
.thirst
;
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
examples/thirst.rs
+
1
−
1
View file @
e857fcf0
...
@@ -107,7 +107,7 @@ pub fn thirsty_scorer_system(
...
@@ -107,7 +107,7 @@ pub fn thirsty_scorer_system(
// calculation here, possibly to clamp the value to a range, add a
// calculation here, possibly to clamp the value to a range, add a
// curve, etc. In our case, we'll just assume thirst goes from
// curve, etc. In our case, we'll just assume thirst goes from
// 0.0..100.0, to keep things simple.
// 0.0..100.0, to keep things simple.
*
score
=
Score
(
thirst
.thirst
)
;
score
.0
=
thirst
.thirst
;
}
}
}
}
}
}
...
...
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