# puzzle15 **Repository Path**: kemi741213/puzzle15 ## Basic Information - **Project Name**: puzzle15 - **Description**: A Game "15 PUZZLE" - **Primary Language**: C++ - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-25 - **Last Updated**: 2026-05-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ๐Ÿงฉ puzzle15 A C++23 implementation of the classic [15 Puzzle game](https://en.wikipedia.org/wiki/15_puzzle). This project is my solution to the Chapter 21 project from LearnCpp: [https://www.learncpp.com/cpp-tutorial/chapter-21-project](https://www.learncpp.com/cpp-tutorial/chapter-21-project/) --- ## โœจ Features - C++23 - Modern CMake with presets - GoogleTest-based tests - Installable CMake package - Google C++ Style-inspired --- ## ๐Ÿ› ๏ธ Environment | Tools | Version | | --- | --- | | **CMake** | 4.3.2 | | **Clang++** | 20.1.8 | | **Git** | 2.43.0 | --- ## ๐Ÿš€ Quick Start ```bash git clone https://gitee.com/kemi741213/puzzle15.git cd puzzle15 git submodule update --init --recursive ``` Build ( `Release` ) and Run: ```bash cmake --preset release cmake --build --preset release cmake --install build/release --prefix install ./install/bin/puzzle15_main ``` --- ## ๐Ÿ”จ Build - `Debug` ```bash cmake --preset debug cmake --build --preset debug ``` - `Release` ```bash cmake --preset release cmake --build --preset release ``` --- ## ๐Ÿงช Test ```bash ctest --preset debug ``` --- ## ๐Ÿ“ฆ Install Install ( `Release` ) ```bash cmake --preset release cmake --build --preset release cmake --install build/release --prefix install ``` Run installed executable: ```bash ./install/bin/puzzle15_main ``` --- ## ๐Ÿงน Clean ```bash rm -rf build/ .cache/ compile_commands.json ``` Clean all generated files: ```bash rm -rf build/ .cache/ compile_commands.json install/ ``` --- ## ๐Ÿ“ Project Structure ``` . โ”œโ”€ apps/ โ”‚ โ”œโ”€ main.cc โ”‚ โ””โ”€ CMakeLists.txt โ”œโ”€ docs/ โ”œโ”€ extern/ โ”‚ โ””โ”€ googletest/ โ”œโ”€ puzzle15/ โ”‚ โ”œโ”€ include/puzzle15/ โ”‚ โ”œโ”€ src/ โ”‚ โ””โ”€ CMakeLists.txt โ”œโ”€ tests/ โ”‚ โ”œโ”€ install/ โ”‚ โ”œโ”€ *_test.cc โ”‚ โ””โ”€ CMakeLists.txt โ”œโ”€ CMakeLists.txt โ””โ”€ CMakePresets.json ``` --- ## ๐Ÿ“š Documentation **Notes:** - [How to set up an environment on Windows with WSL2?](./docs/dev-notes/how_to_setup_env_wsl2.md) - [Which code style?](./docs/dev-notes/which_code_style.md) - [How to use git?](./docs/dev-notes/how_to_use_git.md) --- ## ๐Ÿ“„ License MIT License