Sample TP0 Proposal

This is a sample TP0 submission for a hypothetical student project. It shows the level of detail expected; your proposal will describe your own project. The course staff expects this project would receive a term project grade of about 80%, assuming all proposals are submitted on time and all interviews receive a score of 1.

Section 1: Project overview

What it is. A single-player match-3 puzzle game. The player swaps adjacent gems on an 8×8 board to line up 3 or more of a color. Matches clear, gems fall, and new gems drop in, sometimes causing chain reactions.

What the finished project will include. A title screen, an animated main board, a move limit and target score, a results screen, and automatic reshuffling. Later: hints and special gems.

Section 2: By next week: A playable board

Part A: What these features do

1. Overview

By TP1: a playable Main Board with no fancy animation. The player selects and swaps gems; matches clear, gems “fall” (but just disappear), new gems fill in (by just appearing), and cascades repeat. Score updates. Changes are instant. No move limit or other screens yet.

2. Screens and modes

Main Board (the only screen)

3. Rules and behavior

4. Edge cases

Situation Result
Swap makes matches for both gems Both clear and score.
L or T shape Shared gem clears once. Scoring is an open question.
Run of 6–8 100 points.
Two runs in one row Both found and scored.
No valid move left Nothing yet; player presses R. Reshuffle comes at MVP.

5. Design decisions

6. Out of scope this week

Part B: Core algorithms

The board is a 2D list of color letters (R O Y G B P); None is an empty cell. Cells are (row, col), with (0, 0) at top left.

Algorithm 1: Generating a board with no matches

1. The problem. Fill a random board with no runs of 3+.

2. Data. In: rows, cols (8, 8). Out: a 2D list of letters.

3. Steps. For each cell, top to bottom, left to right:

  1. Allowed = all 6 colors.
  2. If the 2 cells to the left are the same color, remove it.
  3. If the 2 cells above are the same color, remove it.
  4. Pick a random allowed color.

4. Worked example.

Row 0:  R  B  Y
Row 1:  G  B  R
Row 2:  ?  ?  ?

5. Edge cases.

6. Open questions.

Algorithm 2: Finding and clearing matches

1. The problem. After a swap, clear all runs of 3+, drop gems, refill, and repeat until none remain, scoring each run. Also decides whether a swap is valid.

2. Data. In: the board. Out: updated board, points. toClear is a set of cells; runs is a list of run lengths.

3. Steps.

Find matches:

  1. Scan each row left to right, tracking the run’s color and length. When a run ends (new color or end of row) with length ≥ 3, add its cells to toClear and its length to runs.
  2. Do the same for each column.

Handle a swap:

  1. Swap. Find matches. If none, swap back and stop.
  2. Until there are no matches: score runs; set toClear cells to None; move each column’s gems down, keeping order; fill the top with random colors; find matches again.

4. Worked example (one column, top to bottom).

[R, B, G, G, G] → G run at rows 2–4, +30 → clear: [R, B, None, None, None] → fall: [None, None, None, R, B] → refill, say [Y, B, B, R, B] → no run of 3 → done (if no row matches either).

5. Edge cases.

6. Open questions.

Part C: Hand-drawn sketches

Main Board

Picture of the main board

Algorithm 2

Picture of algorithm 2