Simple c++ interface to play board games against bots or players.
Games supported :
- Loot (french tutorial for "Butin")
- Checkers (french tutorial for "Dames")
- BullTricker (french tutorial for "BullTricker")
- Introduction
- Setup
- Functionality
- Future Development
- Select the number of real players and bots before the party
- Select a yellow pawn and then click on all the cases you want to jump to
- Game is finished when there is not any action left
- Choose if you want to play against a bot or a player
- On each turn, the pieces that you can use are marked (in yellow)
- Choose if you want to play against bots or players
- On each turn, the pieces that you can use are marked in (yellow)
Compilation require g++ and sfml installed.
To install sfml :
# Ubuntu
sudo apt-get update
sudo apt-get install libsfml-dev
# Fedora
sudo dnf install SFML-devel
# Arch linux
sudo pacman -S sfml
Compilation
make
Flags
make RELEASE=1 # to disable debugging.
make MAC=1 # necessary on MAC OS
./run
or
make run
- Game Loot
- Game Checkers
- Game BullTricker
- Bot
- RandomStrategy
- Pick a random action
- GreedyStrategy
- Pick an action the maximise the next turn score
- AlphaBetaStrategy
- Only in zero sum 1 vs 1 games (checkers and bulltricker)
- Maximise score over
$n$ parties in the future- Assume each player will try to minimize/maximize the player score
- RandomStrategy
This project has an MVC architecture.
-
- Each game have its own implementation of GameState class, Action class
- a GameState is composed of :
- a BoardType (inherits Board class)
- a list of scores
- its step
- current player id.
- ActionType :
- It requires to implement the following methods
getActions
: Get all the actions appliable on a given GameState.- Checkers queen can have a gigantic number of possible actions, so we restrict the actions given for capture
hasRemainingActions
: is there any action left ?isValid
: Can the action be applied on a GameState ?apply
: Apply the action onto a GameState.actionEquivalence
: Do the two actions have the same effect over a given GameState?
- It requires to implement the following methods
- a GameState is composed of :
- Each game have its own implementation of GameState class, Action class
-
- The launcher alternates between Menu and Games
- If Menu.focus is empty, it focuses the Menu
- If Menu.focus is non empty, it focuses the corresponding Game
- Each game have its own implementation of the Game class
- a Game class is a view for a specific game.
- The launcher alternates between Menu and Games
-
- Each game have its own implementation of Manager class
- Manager acts as the controller :
- it initializes the first game state, and it checks if an action is valid before applying it
- GUI
- helper for Checkers
- arrows for Checkers
- BOT
- MonteCarloStrategy