Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
Futures Demo
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
cosc250-2023
Futures Demo
Commits
a23f174d
Commit
a23f174d
authored
4 years ago
by
William Billingsley
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug where labels weren't being updated correctly.
parent
359f2de1
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/scala/cosc250/boids/BoidsApp.scala
+4
-4
4 additions, 4 deletions
src/main/scala/cosc250/boids/BoidsApp.scala
with
4 additions
and
4 deletions
src/main/scala/cosc250/boids/BoidsApp.scala
+
4
−
4
View file @
a23f174d
...
...
@@ -36,8 +36,8 @@ object BoidsApp {
val
regenesis
=
new
JButton
(
"Regenesis"
)
val
directionLabel
=
new
JLabel
(
"Flock direction: xx radians"
)
val
separation
Label
=
new
JLabel
(
"Flock speed: xx"
)
val
velocity
Label
=
new
JLabel
(
"Flock separation: xx"
)
val
velocity
Label
=
new
JLabel
(
"Flock speed: xx"
)
val
separation
Label
=
new
JLabel
(
"Flock separation: xx"
)
@main
def
run
=
{
...
...
@@ -124,8 +124,8 @@ object BoidsApp {
boidsPanel
.
setBoids
(
Simulation
.
update
())
SwingUtilities
.
invokeLater
(()
=>
directionLabel
.
setText
(
s
"Flock direction: ${Simulation.flockDir} radians"
)
direction
Label
.
setText
(
s
"Flock speed: ${Simulation.flockSpeed} "
)
direc
tionLabel
.
setText
(
s
"Flock separation: ${Simulation.flockSep}"
)
velocity
Label
.
setText
(
s
"Flock speed: ${Simulation.flockSpeed} "
)
separa
tionLabel
.
setText
(
s
"Flock separation: ${Simulation.flockSep}"
)
)
})
timer
.
start
()
...
...
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