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

Dev #18

Merged
merged 4 commits into from Jul 15, 2020
Merged

Dev #18

merged 4 commits into from Jul 15, 2020

Conversation

JuiP
Copy link
Member

@JuiP JuiP commented Jul 9, 2020

Traceback (most recent call last):
File "/usr/share/sugar/activities/dotsAndBoxes.activity/main.py", line 366, in run
ret = self.where(pos)
File "/usr/share/sugar/activities/dotsAndBoxes.activity/main.py", line 211, in where
b = self.boxes[x_b][y_b]
IndexError: list index out of range

Seen when H and V values are changed mid game. The fix seems small but took me time to figure out the cause. Initially I thught it was a port to python3 regression but wasn't.

@quozl @chimosky Please test, review and merge :)

@quozl
Copy link
Contributor

quozl commented Jul 10, 2020

Thanks. Tested. Please put traceback from first pull request comment into commit message of patch that fixes it?

@JuiP
Copy link
Member Author

JuiP commented Jul 11, 2020

@quozl done in dabbb80

@quozl
Copy link
Contributor

quozl commented Jul 13, 2020

Re: dabbb80 the traceback has lost indentation; the usual cognitive process that processes the traceback is challenged or reduced by the change to indentation.

JuiP added 4 commits July 14, 2020 13:16
Fix: IndexError.

Traceback (most recent call last):
  File "/usr/share/sugar/activities/dotsAndBoxes.activity/main.py", line 366, in run
    ret = self.where(pos)
  File "/usr/share/sugar/activities/dotsAndBoxes.activity/main.py", line 211, in where
    b = self.boxes[x_b][y_b]
IndexError: list index out of range

To reproduce- Play a game half way and change V or H values, then try playing with changed grid. IndexError seen.
@JuiP
Copy link
Member Author

JuiP commented Jul 14, 2020

@quozl done

@quozl
Copy link
Contributor

quozl commented Jul 14, 2020

Thanks. Reviewed. Approved.

@chimosky chimosky merged commit fa389f7 into sugarlabs:master Jul 15, 2020
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.

Changing the H and V values to 2 mess up the lines Make a release.
4 participants