Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trace

A minimalistic Android puzzle game built with Flutter. Draw one continuous path through every cell on the grid — no revisits, no diagonals.

Run

cd trace
flutter pub get
flutter run

Target a connected Android device or emulator.

How levels are defined

Levels live in lib/data/levels.dart. Each Level specifies:

  • rows / cols — grid size
  • startGridPos(row, col) where the path must begin
  • blocked — optional list of impassable cells
Level(
  id: 11,
  rows: 5,
  cols: 5,
  start: GridPos(0, 0),
  blocked: [GridPos(2, 2)],
)

Add a new entry to kLevels and increase progression in progress_provider.dart if needed.

Win detection

A level is won when:

  1. The path length equals the number of playable cells (rows × cols − blocked).
  2. Every playable cell appears exactly once in the path.

Moves are rejected if they leave the grid, enter a blocked cell, step non-adjacently, or revisit a cell. Dragging back onto the previous cell backtracks one step.

Project structure

  • lib/models/Level, GridPos, GameState
  • lib/providers/ — Riverpod game + progress state
  • lib/widgets/trace_painter.dart — grid and path rendering
  • lib/screens/ — game and level select

About

Trace — a minimalistic Hamiltonian path puzzle for Android (Flutter)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages