jwalsh / jwalsh/2048-cli-debug

Screen-based 2048 controller implementation

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Goal
Build a controller using GNU Screen to manage and interact with 2048 game sessions.

## Background
We created play_with_screen.sh but need a proper implementation that uses screen's capabilities for terminal management.

## Requirements
- [ ] Create screen session with 2048
- [ ] Use screen's hardcopy to capture display
- [ ] Parse screen buffer for game state
- [ ] Send keystrokes through screen
- [ ] Handle multiple concurrent sessions
- [ ] Support session recording/playback

## Technical Approach
1. Start 2048 in named screen session
2. Use 'screen -X hardcopy' for state capture
3. Parse hardcopy output for board/score
4. Use 'screen -X stuff' to send keys
5. Implement timing and synchronization

## Success Criteria
- Can manage game in background screen session
- Reliable state extraction from hardcopy
- Can replay games from screen logs
- Works headlessly on servers

## Benefits over other approaches
- No debugger complexity
- More robust than raw TTY
- Built-in session management
- Can detach/reattach sessions

## References
- play_with_screen.sh - Initial attempt
- debugger_tty_bridge.sh - Screen + LLDB hybrid

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.