PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Airbnb

Design a Connect-Four-like board game

Last updated: Apr 25, 2026

Quick Overview

This question evaluates object-oriented design, modularity, extensibility, and testability in modeling a turn-based, grid-based drop-token game, and is categorized under Software Engineering Fundamentals; it requires both conceptual architecture and practical application thinking.

  • hard
  • Airbnb
  • Software Engineering Fundamentals
  • Software Engineer

Design a Connect-Four-like board game

Company: Airbnb

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: hard

Interview Round: Onsite

Design an object-oriented model for a turn-based, grid-based “drop token” board game similar to Connect Four. Game rules (define these precisely in your design): - The board has `rows` and `cols`. - Players alternate turns. - A move chooses a column; the token falls to the lowest available row in that column. - If a column is full, the move is invalid. - A player wins by forming `K` consecutive tokens in a line (horizontal, vertical, or diagonal). - The game ends when someone wins or the board is full (draw). Requirements: - Provide class/interface design (e.g., `Game`, `Board`, `Player`, `Move`, `Rules/WinCondition`). - Show key methods and responsibilities (no need for full code, but be concrete). - Make it easy to extend (e.g., different win conditions, different gravity direction, or different board sizes). - Discuss how you would test the win-checking logic and move validation.

Quick Answer: This question evaluates object-oriented design, modularity, extensibility, and testability in modeling a turn-based, grid-based drop-token game, and is categorized under Software Engineering Fundamentals; it requires both conceptual architecture and practical application thinking.

Related Interview Questions

  • Design a banking ledger for deposits/withdrawals - Airbnb (medium)
  • How do you conduct a code review exercise? - Airbnb (hard)
  • Design an extensible request Retryer - Airbnb (medium)
Airbnb logo
Airbnb
Jan 19, 2026, 12:00 AM
Software Engineer
Onsite
Software Engineering Fundamentals
13
0

Design an object-oriented model for a turn-based, grid-based “drop token” board game similar to Connect Four.

Game rules (define these precisely in your design):

  • The board has rows and cols .
  • Players alternate turns.
  • A move chooses a column; the token falls to the lowest available row in that column.
  • If a column is full, the move is invalid.
  • A player wins by forming K consecutive tokens in a line (horizontal, vertical, or diagonal).
  • The game ends when someone wins or the board is full (draw).

Requirements:

  • Provide class/interface design (e.g., Game , Board , Player , Move , Rules/WinCondition ).
  • Show key methods and responsibilities (no need for full code, but be concrete).
  • Make it easy to extend (e.g., different win conditions, different gravity direction, or different board sizes).
  • Discuss how you would test the win-checking logic and move validation.

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Airbnb•More Software Engineer•Airbnb Software Engineer•Airbnb Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.