Refactor rock–paper–scissors for config and ties

Read the full interview experience this question came from →

Quick Overview

This question evaluates a candidate's proficiency in object-oriented design, configuration injection, extensibility, state tracking (including ties), and testability when refactoring a Rock–Paper–Scissors tournament to support configurable rounds.

Refactor rock–paper–scissors for config and ties

Company: Apple

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

Refactor an existing Rock–Paper–Scissors tournament with three robot players so that the number of rounds is configurable and the system also tracks ties. Describe the class/interface changes (e.g., Game, Match, Player, Strategy, Scoreboard, Config), how configuration is injected, how results are reported (per-player wins and total ties), and how you would make the design extensible for new strategies or gestures and testable.

Overview: This question evaluates a candidate's proficiency in object-oriented design, configuration injection, extensibility, state tracking (including ties), and testability when refactoring a Rock–Paper–Scissors tournament to support configurable rounds.

Read the full Apple Software Engineer interview experience this question came from

|Home/Coding & Algorithms/Apple
Apple logo
Apple
Sep 6, 2025
mediumSoftware EngineerOnsiteCoding & Algorithms
10
0

Refactor an existing Rock–Paper–Scissors tournament with three robot players so that the number of rounds is configurable and the system also tracks ties. Describe the class/interface changes (e.g., Game, Match, Player, Strategy, Scoreboard, Config), how configuration is injected, how results are reported (per-player wins and total ties), and how you would make the design extensible for new strategies or gestures and testable.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...