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) 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 + + 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); } }