A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing


  • 3 years ago

Mechanical MOOC MIT OCW 6.189 Final Project: Tetris Is anyone working on the Tetris project? It is interesting and challenging, and it would fun for some of us to consider different approaches to the algorithms, code details, and optional features to include. In the Tetris game, shapes composed of four blocks each appear on the board, and the player can use the keyboard to control the orientation and direction of movement of the one that has been most recently added. As the game proceeds, new shapes are added to the board whenever the current shape gets to a place where it is no longer able to move. The game ends when the board is too full for a new shape to be added. But when a row becomes full, that row is removed and all rows above it move down, so theoretically the game can go on indefinitely. Link to my original code for Tetris: http://ideone.com/DSYLDe The code was edited on August 9, 2013, to add a scoreboard and the ability to pause and unpause the game, using the 'p' key. The working copy is located here: Although this assignment did not require a scoring system for the game, it was suggested as an optional feature. Tetris is more fun if there is a score to watch, so I've updated it here to implement that as a feature. The updated code is here: http://ideone.com/HtX25i The scoring rules that are used here are as follows: > For each shape that the system successfully adds to the board, 1 point is added to the score. > Whenever rows are completed, and subsequently removed from the board, the number of rows removed is squared and the result is added to the score. To run either version of the code, save it locally, and download the graphics.py file to the same folder. graphics.py is available here: http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-189-a-gentle-introduction-to-programming-using-python-january-iap-2011/assignments/graphics.py Tetris and the preceding Conway's Game of Life project include a graphical interface and animation and require lots of object oriented detail in the code. Codecademy, Unit 11 - Introduction to Classes provides an overview of that topic. A significant amount of debugging has been necessary, but in both cases, the .pdf handouts and the code templates have provided lots of help. Before starting the project, it's probably a good idea to do the Codecademy exercises, other homework for the Mechanical MOOC, and the Hangman and Conway's Game of Life projects. The instructions for coding the Tetris project draw upon many of the concepts and techniques presented by that material. Note that MIT OCW 6.189 Homework 4 introduces graphics and animation. For the Tetris .pdf handout, see http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-189-a-gentle-introduction-to-programming-using-python-january-iap-2011/assignments/MIT6_189IAP11_final_proj.pdf

  • This Question is Closed

    Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...


  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.