diff --git a/README.md b/README.md index 2eda239..44eb2d3 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,19 @@ # GitTerra +
+Gitterra Guide Title Pic +
+ A git-based game running in CI/CD and played by coding! Every time you push to your repository, GitTerra will analyze your code and generate the game map. You can see generated map of your city / code in the pipeline's artifacts - deploy it to GitHub / GitLab Pages, a web server of your choice or download to a local machine, it is up to you. -See instructions below on how to play GitTerra on your GitHub or GitLab repositories. +See instructions below on how to play GitTerra on your [GitHub](#in-github-repo) or [GitLab](#in-gitlab-repo) repositories. + +![A built map](/docs/generated_map.png) ## In GitHub repo diff --git a/docs/generated_map.png b/docs/generated_map.png new file mode 100644 index 0000000..50bf2d8 Binary files /dev/null and b/docs/generated_map.png differ diff --git a/src/map.js b/src/map.js index 9ef3c9e..a20dca4 100644 --- a/src/map.js +++ b/src/map.js @@ -23,7 +23,7 @@ function getMapTileCoordinates(n) { // boolean representing the side of the diamond, e.g. left (false) or right (true) const direction = Math.ceil((n - Math.pow(Math.floor(Math.sqrt(n)), 2)) / 2) - - Math.floor((n - Math.pow(Math.floor(Math.sqrt(n)), 2)) / 2) === + Math.floor((n - Math.pow(Math.floor(Math.sqrt(n)), 2)) / 2) === 0; if (direction) { @@ -98,6 +98,13 @@ export const generateMapHTML = function (gameConfig, total) { return ` + + + + Your Repo Map | GitTerra - Your Repo Map | GitTerra +