Project structure and UML first draft
This commit is contained in:
parent
b0aeb31492
commit
2b9593bee8
10 changed files with 109 additions and 0 deletions
28
CMakeLists.txt
Normal file
28
CMakeLists.txt
Normal file
|
@ -0,0 +1,28 @@
|
|||
cmake_minimum_required(VERSION 3.14)
|
||||
project(src)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(tests)
|
||||
|
||||
# Detect and add SFML
|
||||
find_package(SFML COMPONENTS system window graphics network audio REQUIRED)
|
||||
if(NOT SFML_FOUND)
|
||||
message(FATAL_ERROR "SFML could not be found")
|
||||
endif()
|
||||
|
||||
# Detect and add GTest
|
||||
find_package(GTest REQUIRED)
|
||||
if(GTest_FOUND)
|
||||
enable_testing()
|
||||
else()
|
||||
message(FATAL_ERROR "GTest could not be found")
|
||||
endif()
|
||||
|
||||
# Find PugiXML
|
||||
find_path(PugiXML_INCLUDE_DIR pugixml.hpp)
|
||||
if(NOT IS_DIRECTORY ${PugiXML_INCLUDE_DIR})
|
||||
message(FATAL_ERROR "PugiXML could not be found")
|
||||
endif()
|
|
@ -5,6 +5,10 @@ Project Maat is the codename of my C++ course "mini-project" based on the quote
|
|||
|
||||
This game is aimed to be a puzzle game in which the player sets different laws for the world and the people within it as to control what happens after hitting "play" and achieve the level's goal. I was inspired both by [The Incredible Machine](https://en.wikipedia.org/wiki/The_Incredible_Machine_(video_game)) and its successors and by a much more recent game : [Baba is you](https://en.wikipedia.org/wiki/Baba_Is_You).
|
||||
|
||||
## Structure
|
||||
|
||||
![UML Diagram](UML_Class_Diagram.png)
|
||||
|
||||
## TODO
|
||||
|
||||
- [ ] Level
|
||||
|
|
BIN
UML_Class_Diagram.png
Normal file
BIN
UML_Class_Diagram.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
12
src/CMakeLists.txt
Normal file
12
src/CMakeLists.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
cmake_minimum_required(VERSION 3.14)
|
||||
project(src)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
|
||||
|
||||
add_library(engine Level.cpp Level.h Entity.cpp Entity.h)
|
||||
|
||||
target_link_libraries(engine
|
||||
sfml-window
|
||||
sfml-graphics
|
||||
sfml-system)
|
5
src/Entity.cpp
Normal file
5
src/Entity.cpp
Normal file
|
@ -0,0 +1,5 @@
|
|||
//
|
||||
// Created by trotfunky on 06/06/19.
|
||||
//
|
||||
|
||||
#include "Entity.h"
|
14
src/Entity.h
Normal file
14
src/Entity.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
//
|
||||
// Created by trotfunky on 06/06/19.
|
||||
//
|
||||
|
||||
#ifndef SRC_ENTITY_H
|
||||
#define SRC_ENTITY_H
|
||||
|
||||
|
||||
class Entity {
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif //SRC_ENTITY_H
|
5
src/Level.cpp
Normal file
5
src/Level.cpp
Normal file
|
@ -0,0 +1,5 @@
|
|||
//
|
||||
// Created by trotfunky on 06/06/19.
|
||||
//
|
||||
|
||||
#include "Level.h"
|
18
src/Level.h
Normal file
18
src/Level.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
//
|
||||
// Created by trotfunky on 06/06/19.
|
||||
//
|
||||
|
||||
#ifndef SRC_LEVEL_H
|
||||
#define SRC_LEVEL_H
|
||||
|
||||
|
||||
class Level {
|
||||
Level();
|
||||
|
||||
private:
|
||||
int width;
|
||||
int height;
|
||||
};
|
||||
|
||||
|
||||
#endif //SRC_LEVEL_H
|
12
tests/CMakeLists.txt
Normal file
12
tests/CMakeLists.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
cmake_minimum_required(VERSION 3.14)
|
||||
project(src)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
|
||||
|
||||
add_executable(gTests gTests.cpp gTests.cpp)
|
||||
|
||||
target_link_libraries(gTests
|
||||
engine
|
||||
gtest
|
||||
pthread)
|
11
tests/gTests.cpp
Normal file
11
tests/gTests.cpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
//
|
||||
// Created by Teo-CD on 06/06/19.
|
||||
//
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc,argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
Loading…
Add table
Reference in a new issue