topheman / snake-pipe-rust

🦀 A snake game based on stdin/stdout (+tcp and unix sockets) in rust
MIT License
12 stars 1 forks source link

Cursor still hidden after ctrl+c when replaying a game #1

Closed topheman closed 8 months ago

topheman commented 8 months ago

When I run ./target/debug/snake gamestate|./target/debug/snake render and I stop the party with Ctrl+C, the cursor comes back to shown thanks to https://github.com/topheman/snake-pipe-rust/blob/master/crates/common/src/render.rs#L77

However, when I replay a party:

  1. Record: ./target/debug/snake gamestate|tee /tmp/snake-output|./target/debug/snake render
  2. Replay cat /tmp/snake-output|./target/debug/snake throttle|./target/debug/snake render

When I hit Ctrl+C to stop, the cursor is still hidden, it should be show.