edersasch / boardgames

Framework including the game Mühle (nine men's morris)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Language grade: C/C++

Boardgames

  • C++ 17 framework with piece / field association, move list, engine and UI
  • Mühle (German name for nine Men's Morris or Mill) Manual Anleitung
  • Available under MIT license

Framework UI Independent

  • Interface boardgame_ui for commands from the game to its user interface
  • Interface move_list_ui for commands from the provided move_list implementation to its user interface
  • Interface main_loop to delegate tasks to the utilized main loop implementation
  • Engine implementation alpha_beta (depends on martinus/robin-hood-hashing, see "Build Requirements" below)
  • Move list implementation move_list, supporting branches and json import / export (depends on nlohmann/json, see "Build Requirements" below)
  • Piece and field functions pieces_n_fields that help manage associations; defines strong types to prevent mixing up field and piece ids

Framework UI

depends on Qt, see "Build Requirements" below

  • Confirm_Button widget
  • Field and Piece, Piece_Column_Box, Piece_Row_Box
  • multi_move_list, move_list with Move_Button, Move_List_Control, Move_List_Entry, Move_List_Root

Mühle UI Independent

  • muehle with constants, free functions and engine methods
  • muehle_state class (depends on boost-ext/sml, see "Build Requirements" below)

Mühle UI

depends on Qt, see "Build Requirements" below

  • Muehle_Board
  • muehle entry point and setup

Build Requirements

  • C++ 17 toolchain (e.g. gcc >= 7.3.0)
  • CMake >= 3.14.0
  • Qt >= 5.15.0 with Qml
  • nlohmann/json >= 3.4.0, downloaded automatically if option BOARDGAMES_USE_EXTERNAL_JSON is OFF (license: MIT)
  • martinus/robin-hood-hashing >= 3.11.5, downloaded automatically if option BOARDGAMES_USE_EXTERNAL_ROBIN_HOOD_HASH is OFF (license: MIT)
  • boost-ext/sml >= 1.1.3, downloaded automatically if option BOARDGAMES_USE_EXTERNAL_SML is OFF (license: Boost 1.0)

Optional Tools

  • GTest >= 1.12.1, downloaded automatically if option BOARDGAMES_BUILD_TESTS is ON
  • Umlet UML Editor (*.uxf files in /docs)
  • Doxygen documentation tool, enables apidoc build target
  • Pandoc enables manuals build target
  • GCov (part of gcc) / LCov for coverage report if option BOARDGAMES_COVERAGE_REPORT is ON

Directory Structure

The top level structure follows the pitchfork layout.

data/

Contains graphics files and a valgrind memcheck suppression file memcheck.supp

docs/

Manuals, Changelog.md and UML diagrams

src/

Framework parts are located in the directories boardgame/ and boardgame_qml/. "Mühle" resides in muehle and muehle_qml.

tests/

Unit tests are placed separately from their sources, because measuring test coverage becomes incorrect if the test resides in the same directory as the source files. Test code coverage is of course 100%, so the overall coverage would look better than it is. Naming unit test files is done as described in the pitchfork paragraph Merged Test Placement.

The directories whose names match a directory name from src/ contain unit tests.

Included Resources

CMake file AddGoogleTest.cmake adapted from https://github.com/CLIUtils/cmake/blob/4e52e4d0bc2e9fd27171926d0b5d9f396dd8637c/AddGoogleTest.cmake is licensed under a BSD 3-Clause License (local copy): use URL instead of GIT

CMake file CodeCoverage.cmake adapted from https://github.com/bilke/cmake-modules/blob/d98828f54f6974717798e63195cfbf08fe2daad0/CodeCoverage.cmake is licensed under a BSD 3-Clause License included in the file itself: changed LCOV_FILTER_CMD parameter from --remove to --extract, so setup_target_for_coverage_lcov() parameter EXCLUDE is turned on its head and will only include what is listed.

CMake file DeployQt.cmake adapted from https://github.com/nitroshare/nitroshare-desktop/blob/f4feebef29d9d3985d1699ab36f0fac59d3df7da/cmake/DeployQt.cmake is licensed under MIT License included in the file itself: added QML dirs

Icons adapted from tiddlywiki 5.1.17 are licensed under a BSD 3-Clause License (local copy): added version="1.1" xmlns="http://www.w3.org/2000/svg" to svg tag

Icon taken from openclipart is licensed under Creative Commons Zero 1.0 Public Domain License:

  • engine.svg (Wireframe-Head.svg): changed stroke-width to 19.0665, set width and height to 22pt

pandoc.css taken from https://gist.github.com/killercup/5917178 is most likely licensed under Creative Commons Zero 1.0 Public Domain License

About

Framework including the game Mühle (nine men's morris)

License:MIT License


Languages

Language:C++ 70.4%Language:QML 14.5%Language:CMake 12.4%Language:Shell 1.5%Language:CSS 1.1%Language:VBScript 0.0%