A community-built Power Platform sample
A Puzzle a Day
A **Puzzle a Day** is a clever twist on the classic tangram concept. You’re given 8 colorful, irregular shapes and a game board that resembles a 7×7 grid - but with a catch: some cells are blocked and unusable, which changes how the pieces fit. Your goal: place all the pieces so that they don’t overlap, and exactly two valid cells remain empty - one for the month, and one for the day.

- Last updated
- Apr 17, 2025
- Category
- Canvas apps
- Premium license
- Not required
- Experimental features
- Yes
From idea to implementation
Make it your own.
Check this sample's prerequisites, permissions, and licensing before importing it. The documentation below comes directly from the sample README.
Summary
A Puzzle a Day is a clever twist on the classic tangram concept. You’re given 8 colorful, irregular shapes and a game board that resembles a 7×7 grid - but with a catch: some cells are blocked and unusable, which changes how the pieces fit. Your goal: place all the pieces so that they don’t overlap, and exactly two valid cells remain empty - one for the month, and one for the day.
Behind the scenes, the entire game is powered by Named Formulas and User Defined Functions - a modern, maintainable approach to building logic in Power Apps. This design dramatically reduces code duplication, standardizes all calculations, and improves code redability by keeping the logic declarative and modular. Every shape move, rotation, or board update is calculated cleanly and efficiently.

Applies to
Compatibility
Contributors
Version history
| Version | Date | Comments |
|---|---|---|
| 1.0 | April 17, 2025 | Initial release |
Prerequisites
Make sure that experimental features are enabled:
- User-defined functions
- User-defined types

Minimal path to awesome
Using the solution zip
- Download the
.zipfrom thesolutionfolder - Within Power Apps Studio, import the solution
.zipfile using Solutions > Import Solution and select the.zipfile you just packed.
Using the source code
You can also use the Power Apps CLI to pack the source code by following these steps:
Clone the repository to a local drive
Pack the source files back into a solution
.zipfile:pac solution pack --zipfile pathtodestinationfile --folder pathtosourcefolder --processCanvasAppsMaking sure to replace
pathtosourcefolderto point to the path to this sample'ssourcecodefolder, andpathtodestinationfileto point to the path of this solution's.zipfile (located under thesolutionfolder)Within Power Apps Studio, import the solution
.zipfile using Solutions > Import Solution and select the.zipfile you just packed.
Features
- Fully declarative Power Fx architecture: no Power Automate, no connectors - built entirely with Named Formulas, User Defined Functions, and native Power Apps logic.
- Named Formulas as data model:
nfCanva— generates the board with titles and coordinatesnfShapesDefault— stores default shape geometry, rotations, positionsnfForbiddenCells— defines blocked cells on the board
- User Defined Functions (UDFs) for all game logic:
udfShape(shapeName)— central lookup returning all dynamic shape parametersudfShapeCanvaCells(shapeName)— calculates absolute positions of shape cells based on position and rotationudfMovementAvailability(shapeName)— returns movement availability in all four directions using smart collision detection
- Modular gameplay functions:
udfMove(...),udfRotate(...),udfRemoveShape(...)— all actions update both shape position and the board status (_canva)udfUpdateCanva(...)— modular board painter used consistently for all shape actions
Help
We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
If you encounter any issues while using this sample, you can create a new issue.
For questions regarding this sample, create a new question.
Finally, if you have an idea for improvement, make a suggestion.
Disclaimer
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.