nothings / single_file_libs

List of single-file C/C++ libraries.
8.86k stars 585 forks source link

Submission: C-Turtle, Python's Turtle for C++ #170

Open walkerje opened 4 years ago

walkerje commented 4 years ago

Due to easier integration, I've decided to make my package Header-Only. It's intended to be used as an educational package, however I can imagine several uses outside of academia. It's a nearly 1:1 implementation of Python's turtle in C++ I created for my peer college students to better familiarize themselves with the syntax of C++ using familiar content (at my institution of learning, Python is taught before C++).

It's two files (one on its own, but at least two are required). The entirety of the CTurtle library itself is located in the CTurtle.hpp header, however it's only dependency is CImg.hpp, which is also header-only. This was done to trim down the work needed for displays and drawing operations. As it stands, C-Turtle has been tested for both Linux (Mint 19 Cinnamon)/GCC and Windows 10 (VS 2017)/MSVC with no notable issues or differences between the two cases.

It has documentation available in its Repository, and the source itself is heavily annotated with thoughts and comments as I was developing it. It has been released under the MIT license.

https://github.com/walkerje/C-Turtle