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

add density in cfg #38

Merged
merged 1 commit into from May 27, 2022
Merged

add density in cfg #38

merged 1 commit into from May 27, 2022

Conversation

mingzhang96
Copy link
Collaborator

@mingzhang96 mingzhang96 commented May 27, 2022

说明

config 中添加了 match_ratio 字段。表示比赛setting的配置比例。默认是1.0。这个值将会乘到manager里涉及到球球数量的参数和地图大小上,来保证等比例对场景进行缩放。例如如果这个值设为0.5,则地图宽高会乘以 math.sqrt(0.5) 来保证面积为原来的0.5倍,然后地图内球球的数量会乘以0.5。

使用

server = Server(cfg=dict(match_ratio=1.0))

@codecov
Copy link

codecov bot commented May 27, 2022

Codecov Report

Merging #38 (d1ad5f1) into v0.2.0 (184f643) will decrease coverage by 0.55%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           v0.2.0      #38      +/-   ##
==========================================
- Coverage   88.29%   87.73%   -0.56%     
==========================================
  Files          63       63              
  Lines        3974     4021      +47     
==========================================
+ Hits         3509     3528      +19     
- Misses        465      493      +28     
Flag Coverage Δ
unittests 87.73% <100.00%> (-0.56%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
gobigger/server/server_default_config.py 100.00% <ø> (ø)
gobigger/server/server.py 68.42% <100.00%> (-3.41%) ⬇️
gobigger/managers/thorns_manager.py 78.37% <0.00%> (-5.41%) ⬇️
gobigger/players/human_player.py 89.33% <0.00%> (-1.34%) ⬇️
gobigger/render/env_render.py 92.97% <0.00%> (-1.29%) ⬇️
gobigger/hyper/actions.py 53.62% <0.00%> (-1.21%) ⬇️
gobigger/balls/spore_ball.py 100.00% <0.00%> (ø)
gobigger/render/test/test_env_render.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 184f643...d1ad5f1. Read the comment docs.

@mingzhang96 mingzhang96 merged commit d1abc09 into v0.2.0 May 27, 2022
@mingzhang96 mingzhang96 mentioned this pull request May 27, 2022
@mingzhang96 mingzhang96 deleted the add-density-dev branch July 29, 2022 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant