jackfrued / jackfrued/Python-100-Days

Day10 大球吃小球初始球问题

Open
#297 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
187k
Forks
55.8k
PR merge metrics
No merged PRs in 30d

Description

当初始球半径大于移动速度时会导致某方向上无法移动

例如:鼠标点击窗口边处,生成球半径radius为20,假设此球圆心坐标(也就是鼠标点击坐标)(self.x, self.y)为(40, 5),x轴速度为0,y轴移动速度self.sy=3,第一次move后,圆心位置(40,8),8-20<=0,导致self.sy变为-3,导致无限循环,不能移动

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue describes the Day 10 ball movement scenario but names no file or test. Locate the code that updates the ball center and reverses its velocity at the window boundary, then reproduce the stated radius-20, speed-3 case. Done means an initially oversized ball can move away from the edge without entering an infinite reversal loop.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
game-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.