Skip to content

thomashancock/games_library

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Games Library

This is a project of creating a Minesweeper game using C++ wrapped in Python. The C++ code forms a library and Python is used to generate the GUI for the game.

The purpose of this project is for the user to call upon the Minesweeper game and GUI within their own python script(s).


System Requirements

The system requirements for installation are:

  • cmake 3.10

  • GCC 7.5.0

  • Boost 1.65.1

  • Python 3.6.9

  • numpy 1.19.4

  • tkinter

This package has been tested using the aforementioned versions of the software and libraries.


Compilation

This code has only been tested Ubuntu and uses cmake to generate the Makefiles.

To compile the library, use the following commands:

cd /path-to-Minesweeper/.

mkdir build

cd build

cmake .. -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DCMAKE_INSTALL_PREFIX=/path-to-installation-directory/. 

make

make install

Note that the user will need to link the installation directory within their python code.

This package provides an example python script (example.py) which calls upon the library.


Alternative

Currently, the Minesweeper game can be used without the GUI. This terminal version is compiled with the following commands:

cd /path-to-Minesweeper/.

g++ src/C++/minesweeper_game.cpp src/C++/game.cpp -o minesweeper -I./include/ 

Future Developments

The aim of this project will be to include more games and expand this into a games library.

Potentially future games:

  • Sudoku

  • Connect-4

  • Wordsearch


To Do

Minesweeper:

  • Have user defined grid and mines.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 56.5%
  • Python 37.9%
  • CMake 5.6%