This question evaluates proficiency in data structures, algorithm design, state management, and API design for game mechanics, focusing on board representation, move operations, win detection, and undo/redo functionality.
Implement a Connect Four variant where when a player inserts a disc into a column, the disc moves to the bottom cell of that column and pushes all existing discs in that column up by one. If the column is already full, the disc that is pushed above the top row is ejected and removed from the board. Design the board representation and APIs to: (