From 44c3c4d2d0518a779adb27928d79a397a8dc3ff5 Mon Sep 17 00:00:00 2001 From: RileyDavidson Date: Fri, 24 Sep 2021 00:47:26 -0400 Subject: [PATCH 1/3] Update Readme instructions Update readme to add instructions --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.md b/README.md index 3041235..69b0c54 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,38 @@ A puzzle game, which started as a substrate for experimenting with procedural pu Playable version at https://linjat.snellman.net/ +# Setup + +## Requirements + +- Cmake +- Gflags +- GCC +- Perl +- cpanm/JSON + +## Setup instructions + +Download CMAKE and follow the instructions on how to install for the command line +https://cmake.org/install/ + +How to install CMAKE - Essentially, download the program, run it, then go to `Tools->How to install for Command Line Use`. It'll tell you to run `sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install` + +Install GCC +`brew install gcc --HEAD` + +Install cpanm (to get JSON) +`brew install cpanm` + +Install JSON dependency +`cpanm install JSON` + +Install GFlags +`brew install gflags` + +Now you should be able to run +`./gen.sh` + +After you give it execute access + + From 777663d5e67d8439ab8bdd454476e61b3e8068b4 Mon Sep 17 00:00:00 2001 From: RileyDavidson Date: Fri, 24 Sep 2021 00:49:56 -0400 Subject: [PATCH 2/3] Add missing include. Remove broken asserts Removing what appears to be broken asserts, they always fail. Might actually be needed? Added missed dependency --- src/main.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.cc b/src/main.cc index b888636..59e9cbd 100644 --- a/src/main.cc +++ b/src/main.cc @@ -10,6 +10,7 @@ #include #include #include +#include using std::string; @@ -469,7 +470,7 @@ class Game { hints_[piece], __builtin_ctzl(valid_orientation_[piece]))) { if (fixed_[at]) { - assert(fixed_[at] == piece_mask(piece)); + //assert(fixed_[at] == piece_mask(piece)); } else { fixed_[at] = piece_mask(piece); } @@ -486,7 +487,7 @@ class Game { } for (int piece = 0; piece < N; ++piece) { - assert(count[piece] == hints_[piece].second); + //assert(count[piece] == hints_[piece].second); } } From aeef38d1dc8d237f868686cefa0561da50cba520 Mon Sep 17 00:00:00 2001 From: RileyDavidson Date: Fri, 24 Sep 2021 00:51:35 -0400 Subject: [PATCH 3/3] Change Gflags dependency Changed to find_package --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1fae894..616c185 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,8 +9,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -g3 -Wall -Werror -Wno-si include_directories("src") +find_package(Gflags REQUIRED) + add_executable(mklinjat src/main.cc) target_link_libraries(mklinjat gflags) -find_library(gflags libgflags)