Skip to content

Created at PyCon2016, I donate this to public domain!#300

Closed
VivianePons wants to merge 3 commits intobbcmicrobit:masterfrom
VivianePons:master
Closed

Created at PyCon2016, I donate this to public domain!#300
VivianePons wants to merge 3 commits intobbcmicrobit:masterfrom
VivianePons:master

Conversation

@VivianePons
Copy link
Contributor

No description provided.

from microbit import *
import random

class simpleTetris():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capital S please.

@VivianePons
Copy link
Contributor Author

I followed the advice and changed the SimpleTetris to use Image directly. The reason I hadn't done so is because it made SimpleTetris independent of the API and so easier to test for me. Anyway, I changed it because I guess it's better not to copy the data structure on a such a small device.

BUT, I have a question. Do you have a way to do some testing on the program without pushing to the microbit? Because I got tired at reading the microbit scrolling error message even on such a small program...

@dpgeorge
Copy link
Member

dpgeorge commented Jun 7, 2016

Do you have a way to do some testing on the program without pushing to the microbit?

Try using tools/pyboard.py to quickly upload and run your script:

$ ./tools/pyboard.py /dev/ttyUSB0 examples/tetris.py

(replace ttyUSB with your device)

@pddring
Copy link

pddring commented Dec 20, 2016

Just found this tetris game and love it - nicely done.

In terms of testing without pushing to the microbit, I've been working on a microbit simulator to make it easier for students / teachers to debug code in a browser. Here it is running your tetris game: https://create.withcode.uk/python/Nb

@dpgeorge
Copy link
Member

dpgeorge commented Sep 6, 2021

This is great, but I'm not sure it can be merged as-is due to the Tetris copyright. Probably renaming "Tetris" in the code would be enough to overcome that problem.

@dpgeorge
Copy link
Member

I've renamed it to FallingBlocks and merged it in 77c2e2a.

Thanks for the contribution, it's a really fun little game!

@dpgeorge dpgeorge closed this Sep 20, 2021
@microbit-carlos microbit-carlos added this to the Version 1.1 milestone Aug 31, 2022
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.

5 participants