Arrow keys, swipe, or tap a cell next to you, to move — swipe back the way you came to undo. Reach the gold goal, then make it back to the dashed start without ever crossing your own trail. A lit beam blocks its line, and standing in one traps you until you undo. Black cells are solid walls — they can also cut a beam's line short.
Pick a tool, then click cells to paint the board. With a color tool selected, click a strip beside the grid to place that color's beam along that row or column — click it again to remove it. Check "starts ON" to make that color's beam already lit at the start of the level, instead of waiting for a player to trigger it.