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

Update Instructions, fix dependencies #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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


5 changes: 3 additions & 2 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <map>
#include <set>
#include <vector>
#include <array>

using std::string;

Expand Down Expand Up @@ -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));
Copy link
Author

Choose a reason for hiding this comment

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

Not sure why this fails every time I run gen

} else {
fixed_[at] = piece_mask(piece);
}
Expand All @@ -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);
Copy link
Author

Choose a reason for hiding this comment

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

Not sure why this fails every time I run gen

}
}

Expand Down