Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ) causing parse error in example_zoo.jl #938

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/logo/example_zoo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ function fractal_step!(model)
while model.spawn_count > 0
p_r = particle_radius(model.min_radius, model.max_radius, abmrng(model))
pos = (rand_circle(abmrng(model)) .+ 1.0) .* abmspace(model).extent .* 0.49
prop_particle = PropFractalParticle(p_r, rand(abmrng(model)) < model.clockwise_fraction))
prop_particle = PropFractalParticle(p_r, rand(abmrng(model)) < model.clockwise_fraction)
add_agent!(pos, FractalParticle, model, prop_particle...)
model.spawn_count -= 1
end
Expand Down
2 changes: 1 addition & 1 deletion src/core/agents.jl
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ macro agent(struct_repr)
if !@capture(struct_repr, struct new_type_(base_type_spec_) <: abstract_type_ new_fields__ end)
@capture(struct_repr, struct new_type_(base_type_spec_) new_fields__ end)
end
abstract_type == nothing && (abstract_type = :(Agents.AbstractAgent))
abstract_type === nothing && (abstract_type = :(Agents.AbstractAgent))
base_agent = __AGENT_GENERATOR__[namify(base_type_spec)]
@capture(base_agent, mutable struct base_type_general_ <: _ __ end)
old_args = base_type_general isa Symbol ? [] : base_type_general.args[2:end]
Expand Down
4 changes: 2 additions & 2 deletions test/visualization_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@testset "agent visualizations" begin
include("../examples/agents_visualizations.jl")
# testing no error when removing files
@test rm("daisyworld.mp4") == nothing
@test rm("daisyworld.mp4") === nothing
include("../examples/zombies.jl")
@test rm("outbreak.mp4") == nothing
@test rm("outbreak.mp4") === nothing
end
Loading