Skip to content

Commit

Permalink
PParchis start message with fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisPalacios committed Feb 23, 2024
1 parent 483f338 commit 207ac4c
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 323 deletions.
286 changes: 0 additions & 286 deletions .vscode/settings.json

This file was deleted.

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ if(NOT DEFINED IGNORELIBS) # Ignoro las librerias para subir la doc a github pa
# Dejo un par como ejemplo. Comentar o descomentar o añadir...
cpmaddpackage("gh:gabime/[email protected]")
cpmaddpackage("gh:catchorg/[email protected]")
#cpmaddpackage("gh:fmtlib/fmt#9.1.0")
cpmaddpackage("gh:fmtlib/fmt#9.1.0")
#cpmaddpackage("gh:nlohmann/[email protected]")
#cpmaddpackage("gh:jarro2783/[email protected]")
endif()
Expand Down
5 changes: 3 additions & 2 deletions app/parchiscmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ int main(int argc, char **argv)
{

std::cout
<< "Parchis, engine v" << pVersion->getVersion() << std::endl
<< "Parchis, engine v" << pVersion->getVersionFull()
<< std::endl
<< std::endl
<< "Uso: " << project_name << std::endl
<< " -h, --help print this help and exit"
Expand All @@ -140,7 +141,7 @@ int main(int argc, char **argv)
if (showVersion)
{
// std::cout << std::endl << "Parchis v" << version << std::endl;
std::cout << "Parchis, engine v" << pVersion->getVersion()
std::cout << "Parchis, engine v" << pVersion->getVersionFull()
<< std::endl
<< std::endl;
}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/libparchis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ if(NOT DEFINED IGNORELIBS) # Ignoro las librerias para subir la doc a github pa
# revisa la sección del gestor de paquetes.

#nlohmann_json::nlohmann_json
#fmt::fmt
#cxxopts::cxxopts
fmt::fmt
spdlog::spdlog)
endif()

Expand Down
24 changes: 10 additions & 14 deletions src/libparchis/PParchis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
//---------------------------------------------------------------------------

#include "PParchis.h"
// Librerías externas
#include <fmt/core.h>
#include <spdlog/spdlog.h>

//---------------------------------------------------------------------------

Expand All @@ -31,16 +34,19 @@ void PParchis::initAttributes()
board = new PBoard("Tablero"); // Instantiate the Board (and Game)

// Get the version number
svnVersion = new PVersion();
PVersion *pVersion = new PVersion();
const auto versionTitle =
fmt::format("| version: {:<20} |",
pVersion->getVersionFull());

// Debug purposes
dbg.setCallerName("Parchis");
dbg.print(1, "+========================================================+");
dbg.print(1, "| PParchis init |");
dbg.printF(1,
"| version: %-20s |",
this->getVersion());
dbg.print(1, versionTitle);
dbg.print(1, "+========================================================+");

delete pVersion;
}

//---------------------------------------------------------------------------
Expand Down Expand Up @@ -72,7 +78,6 @@ PParchis::~PParchis()
{
dbg.print(4, "+========================================================+");
dbg.print(4, "| PParchis DESTRUCTOR |");
delete svnVersion;
delete board;
dbg.print(4, "+===============Fin Destructor PParchis==================+");
dbg.print(4, "| |");
Expand All @@ -85,15 +90,6 @@ PParchis::~PParchis()

//---------------------------------------------------------------------------

/**
* Getter: Returns the version of Parchis Engine
* @return Pointer to char* with the version of the parchis engine
*/
const char *PParchis::getVersion()
{
return svnVersion->getVersion();
}

//---------------------------------------------------------------------------


Expand Down
Loading

0 comments on commit 207ac4c

Please sign in to comment.