Skip to content
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

Development 4 map #16

Open
wants to merge 65 commits into
base: develop
Choose a base branch
from
Open

Development 4 map #16

wants to merge 65 commits into from

Conversation

MicheleMichetti
Copy link
Collaborator

Doneness checkbox:

  • Testing
  • Documentation

@MicheleMichetti MicheleMichetti temporarily deployed to MicheleMichetti_environment February 18, 2024 12:44 — with GitHub Actions Inactive
@MicheleMichetti
Copy link
Collaborator Author

MicheleMichetti commented Feb 18, 2024

@marc-gav with the boost library we need has to be added to Docker and CMakeLists. I get this error when calling
docker compose run test
immagine

Could you check Docker and CMakeLists in my last push and let me know the issue, please?

@MicheleMichetti MicheleMichetti temporarily deployed to MicheleMichetti_environment February 18, 2024 13:03 — with GitHub Actions Inactive
@MicheleMichetti MicheleMichetti temporarily deployed to MicheleMichetti_environment February 18, 2024 13:07 — with GitHub Actions Inactive
@MicheleMichetti
Copy link
Collaborator Author

This is how to handle the installation on Docker dowloading the repo directly from the Boost webpage:

# Download boost, untar, setup install with bootstrap and only do the Program Options library,
# and then install
RUN cd /home && wget http://downloads.sourceforge.net/project/boost/boost/1.84.0/boost_1_84_0.tar.gz \
  && tar xfz boost_1_84_0.tar.gz \
  && rm boost_1_84_0.tar.gz \
  && cd boost_1_84_0 \
  && ./bootstrap.sh --prefix=/usr/local --with-libraries=program_options \
  && ./b2 install \
  && cd /home \
  && rm -rf boost_1_84_0

@marc-gav marc-gav deployed to marc-gav_environment February 18, 2024 13:54 — with GitHub Actions Active
@MicheleMichetti MicheleMichetti temporarily deployed to MicheleMichetti_environment February 18, 2024 16:07 — with GitHub Actions Inactive
@MicheleMichetti MicheleMichetti temporarily deployed to MicheleMichetti_environment February 18, 2024 16:10 — with GitHub Actions Inactive
@MicheleMichetti MicheleMichetti temporarily deployed to MicheleMichetti_environment February 18, 2024 16:13 — with GitHub Actions Inactive
@MicheleMichetti MicheleMichetti temporarily deployed to MicheleMichetti_environment February 18, 2024 16:23 — with GitHub Actions Inactive
@MicheleMichetti MicheleMichetti temporarily deployed to MicheleMichetti_environment February 18, 2024 16:25 — with GitHub Actions Inactive
Map::Map(const uint16_t& id, const uint8_t& current_type, const std::string& map_name, const std::string& bitmap_name, const tileArray& tiles, const uint16_t& dimensionX, const uint16_t& dimensionY,
#include "spdlog/spdlog.h"

Map::Map(const uint16_t& id, const uint8_t& current_type, const std::string& map_name, const std::string& bitmap_name, const tileArray& tiles, const uint16_t& length_x, const uint16_t& length_y,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's create an enum of possible map types

game/src/Map.cpp Outdated
void Map::setTiles(const tileArray& tiles, const uint16_t& length_x, const uint16_t& length_y) {
if (length_x == 0 || length_y == 0) {
SPDLOG_ERROR("The tile matrix that is being set has a dimension of value 0. Exiting. ");
throw;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

game/src/Map.cpp Outdated
Comment on lines 41 to 43
Tile tiletmp = tile_1;
tile_1 = tile_2;
tile_2 = tiletmp;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Tile tiletmp = tile_1;
tile_1 = tile_2;
tile_2 = tiletmp;
std::swap(tile_1, tile_2);

@MicheleMichetti MicheleMichetti temporarily deployed to MicheleMichetti_environment March 9, 2024 19:36 — with GitHub Actions Inactive
@MicheleMichetti MicheleMichetti temporarily deployed to MicheleMichetti_environment March 9, 2024 19:37 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants