← Airbnb Interview Insights

Airbnb·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jun 2026

Summary

Airbnb OOD round for a software engineer role, one question the whole time: design a board game engine for a Connect-4-like game you've never played before. The emphasis was clearly on class design and extensibility rather than getting the rules perfect, which I didn't fully appreciate until I was already halfway through.

Questions Asked (1)

Q1

Design and implement a board game engine for an unfamiliar tabletop game with rules similar to Connect-4. Clarify the rules with the interviewer before starting. Walk through your class decomposition, core API, win detection strategy, and how the design supports future extensibility.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

My first instinct was to just assume Connect-4 rules and start coding, which would've been a mistake.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by asking clarifying questions to nail down the rules, board size, and win conditions, then sketch a clean class decomposition with a Board, Player, and Game controller. Focus on a flexible win-detection strategy and an extensible API that separates game logic from UI and rule variations.

Pro tip: Explicitly call out the trade-off between a generic rule engine and a hardcoded Connect-4 implementation, and propose starting simple with clear extension points—this shows you balance pragmatism with future-proofing.

1. Clarify Requirements

Ask about board dimensions, number of players, win conditions (e.g., 4 in a row), draw conditions, and any special rules. Confirm whether the game is local or networked, and if AI opponents are needed.

2. Define Core Classes and API

Identify main entities: Board, Player, Move, Game. Define a minimal API: makeMove(column), checkWin(), isDraw(), getBoardState(). Discuss separation of concerns and how the API supports different frontends.

3. Design Win Detection

Explain a strategy: after each move, check only lines through the last placed piece (horizontal, vertical, two diagonals) for efficiency. Mention using a direction vector and counting consecutive pieces.

4. Plan for Extensibility

Describe how to support variations: parameterize win length, board size, and player count. Use strategy pattern for win conditions or rule sets. Keep game logic independent of UI.

5. Discuss Trade-offs and Testing

Highlight trade-offs: simplicity vs. generality, performance vs. flexibility. Mention unit testing for win detection and game flow, and how to mock players for testing.

Key Points to Mention

  • Separation of concerns: Board, Player, Game, and UI layers
  • Efficient win detection by checking only lines through the last move
  • Extensibility via parameterized rules (board size, win length, player count)
  • Use of design patterns like Strategy for win conditions or rule variations
  • Clear API design that abstracts game state and actions
  • Testing strategy including unit tests for win detection and game flow

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.