Skip to content

Welcome to CS10: Project V

Version 3.0. Last Updated: 03/20/2023.

Due: Wednesday, 04/05/2023 at 11:59 PM PDT

Pyturis Overview

Brief

In this project, you’ll code the game Tetris in Python, with the Turtle library rendering the graphical user interface (GUI). Python + Turtle + Tetris = Pyturis! This game involves fitting blocks called “pytrominoes” together to fill and clear horizontal lines.

When you’ve correctly implemented all the required functions, you’ll be able to play Pyturis on a screen that looks like the one to the right.

Preliminaries

You’ll need to have watched the Python lectures to complete this project. We also highly recommend completing Lab 12: Intro to Python before starting this project to get acquainted with Python and a text editor. Lab 14: Data Structures in Python may help your understanding of how to use lists in Python, and Lab 15: OOP in Python offers a helpful tutorial with object-oriented programming (OOP) in Python, which is the basis of this project.

This project should be completed with a partner.

Goal

The goal of this project is to provide an opportunity for practicing working with object-oriented programming (OOP) in Python by building a practical program with a structure that mimics real-world projects. In this project, you’ll:

  • practice working with row-major order (a common model for board structures, similar to the new 4x4 board with values block you used in Project 3)

  • learn how to implement and work on either side of an abstraction barrier

  • become familiar with using and extending an existing codebase rather than starting from scratch

TODO

All of the files you’ll need to implement are marked in the files with TODO: your solution here, which you can search for with CTRL+F when you open the starter code in your preferred text editor. You can play a few games of Tetris here, or read this additional section of the spec to become familiar with the game rules. If you’re writing more than 10 lines of code for any function, we recommend you consider other ways to achieve what you’re trying to do, or take a break and head to OH for assistance!