HomePhabricator

Correct an issue when winning "arc anoid" with certain terminal dimensions

Description

Correct an issue when winning "arc anoid" with certain terminal dimensions

Summary: See PHI2085. Python 3 is stricter about integers and floats than Python 2 was, and we can end up passing a float where an integer was expected if the player wins "arc anoid" using a terminal with certain (most?) character dimensions.

Test Plan:

  • Modified "arcanoid.py" to win instantly.
  • Adjusted terminal window to 80x24, ran "arc anoid", reproduced crash.
  • Ran "python2 arcanoid.py" and observed old victory animation behavior.
  • Applied patch.
  • Ran "arc anoid" and observed identical victory animation behavior.

Differential Revision: https://secure.phabricator.com/D21667

Details

Provenance
epriestleyAuthored on Tue, Jun 1, 6:04 AM
epriestleyPushed on Tue, Jun 1, 6:10 AM
Differential Revision
D21667: Correct an issue when winning "arc anoid" with certain terminal dimensions
Parents
rARCbe1a4a9142d5: Avoid leaving stdin in nonblocking mode after a modern prompt
Branches
Unknown
Tags
Unknown
References
HEAD -> master
Build Status
Buildable 25371
Build 35029: Run Core Tests