Skip to content

maxnrb/Ataxx-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ataxx Game

An implementation of game Ataxx using C++ and Qt library. Project realized as part of my 2nd year of engineering school at ISEN Nantes.

Game Play

Ataxx is a strategy board game that involves play by two parties on a seven-by-seven square grid. The object of the game is to make your pieces constitute a majority of the pieces on the board at the end of the game, by converting as many of your opponent's pieces as possible.

Each player begins with two pieces, blue and red. The game starts with the four pieces on the four corners of the board, with blue in the top left and bottom right and red on the other two. White moves first.

During their turn, players move one of their pieces either one or two spaces in any direction. Diagonal distances are equivalent to orthogonal distances. If the destination is adjacent to the source, a new piece is created on the empty departure square. Otherwise the piece on the source moves to the destination. After the move, all of the opponent player's pieces adjacent to the destination square are converted to the color of the moving player.

The game ends when all squares have been filled or one of the players can't play. The player with the most pieces wins. A draw may occur.

Exctact from https://en.wikipedia.org/wiki/Ataxx

Usage

Launch game (go in /cmake-build-debug repertory) :

  • Console mode :
./Mini_project --mode console

To play in this mode :

Player X > startRow startColumn arrivalRow arrivalColumn
  • Graphic mode (with Qt) :
./Mini_project --mode graphic
  • Mixed mode (console + graphic) :
./Mini_project --mode mixed

Screenshot

  • Graphic View:
    Graphic View

  • Console View :
    Console View

Configuration

You can edit startup configuration : go in /Controller/Game_Controller.cpp > launchGame()

  • Add or edit pieces position :
this->setValue(line, column, 1);	// Add blue piece
this->setValue(line, column, 2);	// Add red piece
  • Add obstacles where players can't play :
this->setValue(line, column, 3);	// Add obstacle

Tools

Copyright

Licence: GPL
Author: Maxime NARBAUD
First release date: 2019-06-10

https://github.com/maximenrb

About

Ataxx game in C++ and Qt, with CMake

Topics

Resources

Stars

Watchers

Forks