-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pyramid example #74
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cpp-linter Review
Click here for the full clang-format patch
diff --git a/example/pyramid.cpp b/example/pyramid.cpp
index 80404ca..ec6dff4 100644
--- a/example/pyramid.cpp
+++ b/example/pyramid.cpp
@@ -0,0 +1 @@
+#include <algorithm>
@@ -4 +4,0 @@
-#include <algorithm>
@@ -7 +7 @@
-mcpp::Coordinate ORIGIN {0, 0, 0};
+mcpp::Coordinate ORIGIN{0, 0, 0};
@@ -15,5 +15,2 @@ void make_ring(mcpp::Coordinate base_pt, int side_len) {
- mc.setBlocks(
- base_pt,
- base_pt + mcpp::Coordinate(side_len, 0, side_len),
- mcpp::Blocks::SANDSTONE
- );
+ mc.setBlocks(base_pt, base_pt + mcpp::Coordinate(side_len, 0, side_len),
+ mcpp::Blocks::SANDSTONE);
@@ -23,5 +20,3 @@ void make_ring(mcpp::Coordinate base_pt, int side_len) {
- mc.setBlocks(
- base_pt,
- base_pt + mcpp::Coordinate(side_len - 2, 0, side_len - 2),
- mcpp::Blocks::AIR
- );
+ mc.setBlocks(base_pt,
+ base_pt + mcpp::Coordinate(side_len - 2, 0, side_len - 2),
+ mcpp::Blocks::AIR);
@@ -34,4 +29,3 @@ int main() {
- mcpp::HeightMap heights = mc.getHeights(
- ORIGIN,
- ORIGIN + mcpp::Coordinate(pyramid_base_len, 0, pyramid_base_len)
- );
+ mcpp::HeightMap heights =
+ mc.getHeights(ORIGIN, ORIGIN + mcpp::Coordinate(pyramid_base_len, 0,
+ pyramid_base_len));
@@ -40,4 +34 @@ int main() {
- int min_height = *std::min_element(
- heights.begin(),
- heights.end()
- );
+ int min_height = *std::min_element(heights.begin(), heights.end());
@@ -49 +40 @@ int main() {
- for(int i = 0; i < PYRAMID_HEIGHT; i++) {
+ for (int i = 0; i < PYRAMID_HEIGHT; i++) {
@@ -51 +42 @@ int main() {
- }
+ }
Have any feedback or feature suggestions? Share it here.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Demonstrates basic functionality as well as some available convenience features.