rozukke / mcpp

A library to interface with Minecraft using C++.
https://rozukke.github.io/mcpp/
Apache License 2.0
103 stars 17 forks source link

Chunk iterator and fix getter #73

Closed nhatdongdang closed 2 months ago

nhatdongdang commented 2 months ago

This pull request introduces the following enhancements to the Chunk class:

  1. Addition of Iterator class:

    • Implemented an Iterator class within Chunk to enable traversal of the 3D block data using standard iterator patterns.
    • Added the begin() and end() methods to support range-based loops and iterator-based algorithms.
  2. Doxygen-style documentation:

    • Documented the Iterator class, including all its methods (operator*, operator->, operator++ (prefix and postfix), operator==, operator!=), as well as the begin() and end() methods.
    • Provided clear descriptions of the iterator's functionality and the purpose of each method.
  3. Test Cases:

    • Tests include verifying iteration over the Chunk data.
  4. Fix getter:

    • Fix chunk getter method.