p2-rps

EECS 183 Project 2: Rock-Paper-Scissors — Student Quickstart

Full specification (all details + sample runs): Full Spec

This page is a shorter, student-first version of the full spec. It keeps every requirement, but organizes them for faster onboarding.

Note: you will need to use the details in the full specification to complete the project.

0) Logistics (Dates, Grading, Submissions)

Due date: Friday, October 2, 2026 at 8:00 p.m. (accepted until 11:59:59 p.m.)

Autograder: Direct autograder link

Early bonus (autograder score):

Grading:

Submissions:

This project must be completed individually — no partners.

Difficulty warning: this project is significantly more difficult than Project 1. Expect it to take 2 to 3 times longer to complete.

1) Big Picture (What You’re Building)

You will implement a menu-driven rock-paper-scissors game for two players:

2) Files You’re Given

Download the starter files using this link.

File Purpose You Edit? You Submit?
rps.cpp game functions (all stubbed for you) Yes Yes
test.cpp your test functions (stubbed for you) Yes Yes
start.cpp main() menu to run tests or the game No No

Stubbing means the functions contain minimal code (like return false;) so the project compiles before you implement them. Remove our stub return statements when you write your own implementation.

Important constant in rps.cpp:

Add your name, uniqname, and a small description to the header comments at the top of rps.cpp and test.cpp.

3) Read the RME Comments Like Contracts

Every function declaration in rps.cpp has an RME comment:

If your tests or code violate a Requires clause, the autograder will penalize you. Treat RMEs like a contract between the caller and callee.

Key simplification for this project: user input will always be of the expected data type (e.g., char for moves). You only validate invalid input (wrong value), never bad input (wrong type) — bad input is prohibited by the Requires clauses.

4) Collaboration (No Partners)

This is an individual project. Partners are not allowed.

Allowed collaboration:

Not allowed:

If unsure, ask course staff first. Full policy: Collaboration Policy

5) Suggested Implementation Order

Write, test, and debug one function at a time. Start with functions that call no other functions; write rps() last:

  1. isMoveGood(), isRoundWinner(), announceRoundWinner(), announceWinner()
  2. getMove()
  3. getName(), getMenuChoice()
  4. doRound()
  5. doGame()
  6. rps()

(printInitialHeader(), printMenu(), printErrorMessage(), and printCloser() are already implemented for you.)

6) Test Suite Basics

You will implement the stubbed test functions in test.cpp, called from startTests(). Write tests before you implement each function.

Full details: Testing

Testing notes:

Bug IDs the autograder may report (8 total):

7) Game Rules (Short Version)

Full details: Problem Statement

Rule Meaning
Valid moves r, p, s (uppercase also valid)
Winning moves Rock beats scissors; scissors beats paper; paper beats rock
Same move Round is a draw
Game length Exactly three rounds, always played — even if one player wins the first two
Game winner Whoever wins the most rounds; otherwise no winner
Invalid name Print error, use default: Rocky (Player 1), Creed (Player 2)
Invalid move Print error, use default move r
Menu choice 2 Print Under Construction and return an empty string (lizard-spock is S’more only)

8) Exact Output Rules (Very Important)

Output messages must match the spec exactly — a single spelling or whitespace error can fail almost every autograder test case. Copy/paste prompts from the spec and use a diff checker.

Sample runs: Sample Output

Key messages:

Player 1, enter your name:
Player 2, enter your name:
Choice -->
[name], enter your move:
[name] wins the round!
This round is a draw!
Congratulations [name]!
You won EECS 183 Rock-Paper-Scissors!
No winner!
Invalid menu choice
ERROR: Illegal name given, using default
ERROR: Illegal move given, using default
Under Construction

Newline rules:

9) Function Dependency Map (Who Calls What)

Full details: Function Table

Function Should call
getName() printErrorMessage()
getMenuChoice() printMenu()
isMoveGood() nothing
getMove() printErrorMessage(), isMoveGood()
isRoundWinner() nothing
announceRoundWinner() nothing
doRound() getMove(), isRoundWinner()
announceWinner() nothing
doGame() doRound(), announceRoundWinner()
rps() printInitialHeader(), getName(), getMenuChoice(), doGame(), announceWinner(), printCloser()

You should not use other functions if not specified. getMenuChoice() gets a single menu choice — it should not play the game.

10) Style and Autograder Reminders

Full details: Style Checklist and Style Rubric

Style essentials:

Autograder reminders:

11) Recommended Timeline (Fall 2026)

Date Suggested milestone
Sep 21 Starter files set up; project compiles; starter code submitted; spec read
Sep 23 isMoveGood(), getMove(), isRoundWinner(), announceRoundWinner(), announceWinner() implemented and tested
Sep 25 getName(), getMenuChoice(), doRound() implemented and tested
Sep 27 doGame() implemented and tested; start rps()
Sep 28 rps() written; debugging; 80% or higher on autograder
Sep 30 Last day for 5% bonus
Oct 1 Last day for 2.5% bonus
Oct 2, 2026 Final due

12) Fast Start Checklist

13) How to Get Help

Most students need help from staff multiple times each project — more people need help with Project 2 than Project 1. We’re here for you!

14) Optional Challenge