dewitters / MysticMine

MIT License
76 stars 23 forks source link

Update MysticMine to python3 #23

Open mic47 opened 4 years ago

mic47 commented 4 years ago

Since python2 is being onset, it will be harder to install this game on newer systems, so it might be good idea to convert ti to python 3, as I tried to do that in this PR.

What I did:

  1. Change pyrex to cython (literarly just change the import and it worked).
  2. I run 2to3 to convert most of the code.
  3. Then I fixed the imports.
  4. Then I went through al uses of division, and change to integer division where appropriate (before that, there were bunch of graphic glitches or crashes). This is probably the change that needs most careful eye during code review.
  5. _ was undefined, defined it to gettext.gettext

Testing: I run unittest, and while I didn't finish the game yet with this version, but I unlocked all but one items and game seems to work.