First commit.

Just main().
This commit is contained in:
King_DuckZ 2017-07-14 10:38:36 +01:00
parent 4ab5255800
commit ae65a2f682
5 changed files with 41 additions and 0 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "cmake/cmake-d"]
path = cmake/cmake-d
url = https://github.com/dcarp/cmake-d.git

12
CMakeLists.txt Normal file
View file

@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake-d)
project(disgaea_solver D)
add_executable(${PROJECT_NAME}
src/main.d
src/disgaea_solve.d
)
target_include_directories(${PROJECT_NAME}
PUBLIC src
)

1
cmake/cmake-d Submodule

@ -0,0 +1 @@
Subproject commit 2f3f6b1b0702655762061ab8bab01a288b98cb74

8
src/disgaea_solve.d Normal file
View file

@ -0,0 +1,8 @@
module src.disgaea_solve;
struct Action {
char block;
char tile;
}
Action[] disgaea_solve (

17
src/main.d Normal file
View file

@ -0,0 +1,17 @@
import std.stdio;
import std.array;
import disgaea_solve;
int main (string[] parArgs) {
immutable int expected_arg_count = 3;
if (parArgs.length - 1 < expected_arg_count) {
writefln("Wrong number of arguments: received %d, expected %d",
parArgs.length - 1,
expected_arg_count
);
writefln("Usage: %s <tiles-list> <blocks-list> <current-state>", parArgs[0]);
return 2;
}
return 0;
}