CPSC 329 Software Development Fall 2026

CPSC 329 Project P1 — Hedgehogs Variants

In this (mostly) group project, you and a partner will extend the Hedgehogs in a Hurry game from project P0. This project has two parts:

Contents


Logistics and Due Dates



Part A

In Part A, you'll add reproducible dice rolls to the game, which is handy for testing. Read through this whole part (sections marked with "[A]" in the heading) to get an overview of what you'll be doing, then work through the five tasks in the Tasks section in order.


[A] Functionality Specification

Reproducible Dice Rolls

It can be useful for testing to be able to replay the same sequence of turns. Since the rest of the game is deterministic, this only requires being able to repeat the same sequence of dice rolls: with the same rolls and the same player input, the game plays out the same way.

Computers typically do not generate truly random numbers; instead a pseudorandom number generator produces a sequence of numbers that appears random but is completely determined by a starting value called the seed. Two generators created with the same seed produce the same sequence of numbers. In Java, new Random(seed) creates a generator with the specified seed.

While the same seed ensures the same sequence of values, ensuring the same sequence of dice rolls requires a few additional things:

If these conditions hold, a game can be replayed exactly by starting it with the same number of players, the same dice choice, and the same sequence of player moves.

Three dice roll options should be supported:

There's no way to find out a Random object's seed once it has been constructed, so for random mode it is necessary to generate a seed first and then create the dice generator with that seed. An option here is to create a Random object with the default constructor and use that to generate a random value for the seed. Create a new Random object with the seed to use for dice rolls. Usability suggestion: seeds that are at most 7-8 digits long are much easier to read and type, so consider limiting the range of generated seeds.


[A] Tasks

Do these tasks in order.

A0: Setup

This project starts with each partner working with the other's codebase before settling on one to continue with for the rest of the project.

Each partner, in your own P0 repository:

Each partner, in your partner's P0 repository:

As a team:

A1: Seeded Dice

This is an individual task — no pair programming! You may ask your partner questions about their code if there is something confusing, but not otherwise work together on this part.

Add the random and chosen seed options to your partner's P0 codebase (not your own!). To do this:

Note that all A1 deliverables (other than the initial change impact report submitted on Canvas) go into your partner's repository.

A2: Code Review

This is an individual task.

Review your partner's P0 codebase (including the seeded dice feature you just added). To do this:

A3: Choosing a Codebase and Responding to the Code Review

This is a team task.

The rest of these steps should be taken in the chosen codebase. Note: don't delete the other repository even though it won't be extended further! It is an essential record of work from project P0 and tasks A1-A2.

Plan and split the work identified in the code review (see Planning and Splitting Work in the Team Process section):

Now do the work:

A4: Scripted Dice

This is a team task.

Add the dice script option to the chosen codebase. To do this:



Part B

In Part B, you'll add several rule variants to the hedgehogs game. Read through this whole part (sections marked with "[B]" in the heading) to get an overview of what you'll be doing, then work through the four tasks in the Tasks section in order.

[B] Functionality Specification

Dice Roll Modes

In addition to the random, chosen seed, and dice script modes from Part A, the program should support fixed dice — a die that always rolls the same specified value. Fixed dice are for testing, not game play, so they are not offered as an option at the start of the game.

Black Square Variants

Each variant changes how black squares behave; all other rules are unchanged, and the black squares remain in the standard positions. Unless stated otherwise, a variant's effect applies whenever a hedgehog enters a black square, whether by a forward move or a sidestep.

Turn Variants

Each variant modifies a single step of the turn. A turn still consists of a roll, an optional sidestep, and a forward move, in that order.

Choosing Variants

At the start of the game, after choosing the dice mode, the players choose a black square variant and a turn variant. The standard rules are the default for each. Any combination of dice mode, black square variant, and turn variant must work.


[B] Tasks

Do these tasks in order, continuing with the codebase chosen in Part A.

B0: Preliminaries

This is a team task.

B1: Design

This is a team task, starting with an individual step.

Part B involves three variation points where the behavior can vary among several alternatives: dice roll modes, black square variants, and turn variants. Your design must support all of the dice roll modes and rule variants in the functionality specification, even though you'll implement only a few of them — the point is a design that makes adding the other variations straightforward. (Implementing additional variants beyond those required is extra credit.)

B2: Plan and Implement

This is a team task.

B3: Wrapup

This is an individual task.

Points to address in the reflection:

e

Be honest and thoughtful — whether you found something useful or not won't affect your grade. What matters is what the experience taught you about software development.



Requirements

These are the end results your work (Parts A and B) is assessed against (see Assessment). Team code is assessed according to ownership.

Program Requirements

For the chosen codebase:

Additional black square and/or turn variants can be implemented for extra credit.

For the other codebase:

Code Requirements

For the chosen codebase:

For the other codebase:

Process Requirements

Follow the steps in each task and the practices in the Team Process section.



Team Process

These practices apply to all team tasks in both parts; the Version Control and Test Early practices also apply to A1.

Team Kickoff

As part of A0, discuss the following and record notes in a shared document in Google Docs (or similar). Once you've chosen a codebase to work with in A3, move the document to the file docs/team-kickoff.txt.

Meetings and Team Log

Communication and Shared Records

Planning and Splitting Work

Most development in a team project happens independently and the goal in dividing up tasks between partners is a fair split.

Steps in the planning process:

Effort Estimation

When estimating a task's size, include the time to write its tests. As an approximate guide:

A task bigger than large must be split into smaller tasks. If you are unsure how to decide between two sizes, choose the larger — uncertainty about details of the task is itself a cost since time spent figuring out what to do is part of the task.

When doing effort estimation for a set of issues:

The comparison of independent estimates is a key step — the goal of effort estimation is a fair split of work, but just as important is identifying misunderstandings early — if two people give very different estimates for the same task, it is likely that they are picturing different things and that's something to reconcile sooner rather than later.

Ownership

Cooperative Programming

Version Control

Follow the GitHub Flow workflow:

Pull Request Reviews

It is common on software teams for every change to be reviewed by another developer before it is merged. Peer review catches bugs and design problems before they reach main, keeps the code consistent, and makes sure more than one person understands each part of the code.

For this project, review is required only for the "refactor first" design refactorings in Part B (where the existing behavior is restructured to use the new design). Other pull requests can still be merged by their author without review, as in Part A.

Turnaround time: pull requests should be reviewed within the turnaround window agreed on in your team kickoff. If a review hasn't happened by then, the author may merge without review; add a comment to the pull request saying so.

The partner wanting to merge:

Opening a pull request for review. Open a pull request as usual, but in the description also summarize what changed and say how you tested it in addition to including which issue it completes (Closes #n). Then select your partner under "Reviewers" in the right sidebar so that GitHub notifies them.

The partner reviewing the pull request:

Reviewing.

The partner wanting to merge:

Responding to a review. Address each review comment by pushing a fix to the branch or by replying to the comment with the reason for disagreement. For smaller points, such as naming, formatting, or minor simplifications, just the reply is sufficient. If you disagree about the design itself, however, talk it over with your partner and agree on what to do.

Once a comment has been addressed, click "Resolve comment" on it; a brief reply when resolving (such as "Fixed" or "Renamed as suggested") is optional but helpful. Once every comment has been resolved, the author merges the pull request. (If main has changed since the pull request was opened, first merge main into the branch again and make sure all tests still pass.) For this project there's no need for a second review unless the fixes significantly changed the design; in that case, talk it over with your partner before merging.

Test Early

Testing should be thought of from the beginning:


Deliverables and Handin

Deliverables

Your final code is only part of what is assessed. The list below is for reference — each item is created at a specific point as directed in each task's steps above and together they are a record of your process, not just the end result. Process is a big part of this project! Your commit history, handin tags, and Canvas submissions all provide timestamps to document process.

A0 (in your own repository):

A1 (individual, in your partner's repository unless noted):

A2 (individual, in your partner's repository):

A3 (team, in the chosen repository):

A4 (team, in the chosen repository):

B0 (team, in the chosen repository):

B1 (team, in the chosen repository unless noted):

B2 (team, in the chosen repository unless noted):

B3 (individual):

Handin

Most of the handin happens along the way, through the tags and Canvas submissions listed in Deliverables. To finish:


Assessment

The course projects together account for 50% of your final grade in this course. There are two distinct components to the project grade:

In addition, teamwork is part of the course engagement grade. Teamwork conduct is assessed through a structured peer evaluation at the end of the project (see B3) with your team log and GitHub activity as supporting evidence.