Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: Mjoyufull/Setrixtui

[0.4.1]

26 Feb 05:20

Choose a tag to compare

Fixed

  • Game-over timer: Elapsed time on the game-over screen no longer keeps increasing. Time is frozen at the moment the game ends (stack overflow or time’s up) and the displayed time stays correct.

Changed

  • Dependencies: Dependency updates (no breaking changes).
  • Updated Time dep from git version fixing nix build
    Compatibility
  • Rust: 1.90+ (unchanged).
  • Config, CLI, and save format unchanged; no migration.

[0.4.0]

15 Feb 09:17

Choose a tag to compare

Added

Autoplay ( bot)

  • Heuristic-based bot that plays the game automatically: evaluates placements by spanning clears, height, holes, bumpiness, same-color adjacency, and proximity to build horizontal colour bands.
  • --autoplay flag to enable autoplay (when using --no-menu); when the main menu is used, autoplay can be toggled from the new Autoplay menu tab.
  • Bot uses a lightweight grid snapshot (not a GameState clone); computes rotation + column placement, simulated drop, and sand settle to score each candidate; outputs a queue of actions (rotate, move, hard-drop) consumed each tick.
  • Auto-restart: --auto-restart / -r and the menu RESTART ON/OFF option restart the game automatically on game over (intended for autoplay).

Colour repetition and bias

  • Colour repeat system by difficulty: after each piece, the next piece has a chance to reuse the same colour instead of the shape’s default (Easy 40%, Medium 20%, Hard 8%), making it easier to form same-colour spans.

Predictive next queue

  • Next-piece queue now stores exact colours (TetrominoKind, u8) and pre-determines the colours of upcoming pieces.
  • The Next sidebar shows the next several pieces with their actual colours so you can plan placements in advance.

Custom help system

  • -h / --h: short help (concise).
  • --help / --Help: full tree-style help with controls and detailed info.

Menu enhancements

  • Autoplay and Auto-Restart toggles added to the main menu (new AUTOPILOT section: ENABLED/DISABLED and RESTART ON/OFF).
  • Navigate with Left/Right or Down/Up; confirm with Enter or Hard drop on START SIMULATION to begin with the selected options.

Banner

  • New banner and assets by @sermuns for the project/README.

Version

  • Crate and metadata bumped to 0.4.0.

Changed

Physics and consistency

  • Piece colour snapping: falling pieces now keep their assigned colour through lock and the crumbling phase; Piece carries color_index and it is used when creating FrozenGrains and when drawing, so colours no longer “snap” to the shape default during land/crumble.
  • Sand crumbling: refined crumble delay and lock-down behaviour (e.g. short freeze of 5 ticks before grains drain) for smoother feel.

RNG and bag

  • Bag and game RNG switched from a simple LCG to fastrand::Rng (seeded per game) for piece order and colour bias.

UI and layout

  • Menu popup uses Clear so the menu panel doesn’t smear over the background.
  • When autoplay is active, the sidebar Next area shows AUTOPLAY (red/yellow flashing) instead of the next-piece preview.
  • Playfield size selector and menu layout adjusted for the new Autoplay / Auto-Restart rows (e.g. popup height 22 when playfield size is shown).

Metadata

  • License changed from MIT to GPL-3.0-or-later , forgot to change it .
  • Repository URL updated (e.g. to https://github.com/Mjoyufull/Setrixtui).

Fixed

  • Piece colour no longer changes when the piece locks and turns into sand: assigned colour is preserved from spawn through to frozen grains and playfield sand.
  • Visual and logic consistency for piece colour in the next queue and during crumble so planning and scoring match what you see.

Technical details

  • Autoplay: autoplay::Bot::find_best_move(&state) returns a VecDeque<Action>. App ticks consume one action per tick (with delay and “settling” after hard-drop until frozen grains and crumble are done). Menu can run the game loop in the background when autoplay is enabled and show the live playfield behind the menu.
  • Colour bias: when filling the next queue (initial and after each spawn), each new piece gets kind.color_index(high_color) or, with probability repeat_chance (by difficulty), the last queued colour.
  • Next queue: GameState.next_pieces: Vec<(TetrominoKind, u8)>; UI draw_next_preview / draw_single_piece_preview take (kind, color_index) and render with theme.sand_color(color_index).
  • Piece colour: Piece { kind, gx, gy, rotation, color_index }; lock_piece creates FrozenGrain { color_index: piece.color_index, ... }; playfield drawing uses piece.color_index for the current piece and FrozenGrain.color_index for crumbling grains.

Documentation

  • README: version and install/usage updated; references new banner asset; optional mention of autoplay and menu options.
  • In-game menu labels: AUTOPILOT (Autoplay + Auto-Restart), START SIMULATION.

Compatibility

  • Rust: 1.86+ (unchanged).
  • Config: CLI and game options remain compatible; new flags --autoplay, --auto-restart / -r, and help variants -h / --h, --help / --Help are additive.
  • Save/format: high scores and existing data format unchanged; no migration.

Contributors