From ae65a2f6825cd1cef8e7b8720418815d61865bf4 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Fri, 14 Jul 2017 10:38:36 +0100 Subject: [PATCH] First commit. Just main(). --- .gitmodules | 3 +++ CMakeLists.txt | 12 ++++++++++++ cmake/cmake-d | 1 + src/disgaea_solve.d | 8 ++++++++ src/main.d | 17 +++++++++++++++++ 5 files changed, 41 insertions(+) create mode 100644 .gitmodules create mode 100644 CMakeLists.txt create mode 160000 cmake/cmake-d create mode 100644 src/disgaea_solve.d create mode 100644 src/main.d diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1b0c5e8 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "cmake/cmake-d"] + path = cmake/cmake-d + url = https://github.com/dcarp/cmake-d.git diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..fdfc028 --- /dev/null +++ b/CMakeLists.txt @@ -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 +) diff --git a/cmake/cmake-d b/cmake/cmake-d new file mode 160000 index 0000000..2f3f6b1 --- /dev/null +++ b/cmake/cmake-d @@ -0,0 +1 @@ +Subproject commit 2f3f6b1b0702655762061ab8bab01a288b98cb74 diff --git a/src/disgaea_solve.d b/src/disgaea_solve.d new file mode 100644 index 0000000..f3867df --- /dev/null +++ b/src/disgaea_solve.d @@ -0,0 +1,8 @@ +module src.disgaea_solve; + +struct Action { + char block; + char tile; +} + +Action[] disgaea_solve ( diff --git a/src/main.d b/src/main.d new file mode 100644 index 0000000..c147928 --- /dev/null +++ b/src/main.d @@ -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 ", parArgs[0]); + return 2; + } + + return 0; +}