https://github.com/mathusanm6/ocaml-mille-bornes
An OCaml-based implementation of the classic 'Mille Bornes' board game, designed with a functional programming approach, featuring comprehensive unit testing using Alcotest and QCheck.
https://github.com/mathusanm6/ocaml-mille-bornes
Last synced: over 1 year ago
JSON representation
An OCaml-based implementation of the classic 'Mille Bornes' board game, designed with a functional programming approach, featuring comprehensive unit testing using Alcotest and QCheck.
- Host: GitHub
- URL: https://github.com/mathusanm6/ocaml-mille-bornes
- Owner: mathusanm6
- Created: 2023-11-01T18:39:11.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-09T11:07:49.000Z (over 2 years ago)
- Last Synced: 2025-02-07T01:34:49.053Z (over 1 year ago)
- Language: OCaml
- Homepage:
- Size: 1.19 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mille bornes
[](https://github.com/mathusanMe/OCaml-Mille-Bornes/actions/workflows/github-ci.yml)
## Members
| Name | Gaufre username |
| :------------------ | :-------------: |
| Thomas ARROUS | @arrous |
| Gabin DUDILLIEU | @gdudilli |
| Mathusan SELVAKUMAR | @selvakum |
## Development environment setup
Install [Opam](https://opam.ocaml.org/doc/Install.html), the OCaml
package manager, on your system.
For convenience, we setup a [local](https://opam.ocaml.org/blog/opam-local-switches/) Opam distribution, using the following commands:
```
$ opam init
$ opam switch create . --deps-only --with-doc --with-test
$ eval $(opam env)
```
Configure your favorite text editor, see the [Real World OCaml setup](http://dev.realworldocaml.org/install.html#editor-setup).
You will want to have a working, integrated type-checker in your
editor, as well as type-directed completion. Your favorite text editor
being Emacs, this leads to:
```
$ opam install user-setup tuareg ocamlformat merlin
$ opam user-setup install
```
Make sure that your text editor applies
[OCamlformat](https://ocaml.org/p/ocamlformat/0.22.4/doc/editor_setup.html#editor-setup)
each time a file is modified, this helps settle styling war and avoids
line-noisy patches down the line.
In Emacs, this amounts to adding the following lines to your `.emacs`
configuration file:
```elisp
(require 'ocamlformat)
(add-hook 'tuareg-mode-hook (lambda ()
(define-key tuareg-mode-map (kbd "C-M-") #'ocamlformat)
(add-hook 'before-save-hook #'ocamlformat-before-save)))
```
If need be, you can invoke Dune to re-format the whole codebase:
```
$ dune fmt
```
## Building mille_bornes
To build the project, type:
```
$ dune build
```
For continuous build, use
```
$ dune build --watch
```
instead.
## Running mille_bornes
To run the project, type:
```
$ dune exec mille_bornes
```
## Running the tests
To execute all the tests, type:
```
$ dune runtest
```
This can be combined with continuous build & test, using
```
$ dune runtest --watch
```
## Documentation
The internal project documentation can be compiled to HTML through
```
$ dune build @doc-private
```
The resulting document is available with
```
$ open _build/default/_doc/_html/mille_bornes@*/Mille_bornes/index.html
```