solving_aapjeomino
README.md

Solving AapjeOmino

In this project a framework was given for a synthetic game, which was called AapjeOmino in the course of the project. The given framework consisted of a filled main.cc for playing the game and empty necessary functions for the game (aapjeomino[.h]|.cc), it was our task to program them and program auxiliary functions where necessary. So, in short we programmed everything besides main.cc, zet[.h]|.cc and standaard[.h]|.cc. Some functions required a complex algorithm to accomplish their task. These functions and their auxiliary functions we programmed were:

  • besteScore: a function that calculates the best move possible and the number of possible states for the current player

    • berekenBesteScore, doeZet, undoeZet
  • bepaalGoedeZetten: a function that returns all moves with the maximum possible neighbours for the current player

    • zetToegestaanBuren
  • bepaalMogelijkeZetten: a function that returns all possible moves for the current player

    • zetToegestaanBuren

This project was a school project made in a group and on a git of the University. I therefore copied the whole project to this (private) repository. The language of the program, comments and (most) variables are in Dutch, since the course of this project was also in Dutch. If anything is unclear feel free to contact me.

Aapje Omino

Aapje Omino is a synthetic game based on Dominoes, but now instead of a Domino consisting of 2 sides, a Domino consists of 4 sides. All rules for Dominoes apply for Aapje Omino, but than, ofcourse, adjusted to the stones consisting of 4 sides. All 4 sides must therefore match the side of the neighbours they are connected to.

Testing

There are 6 test files given for a game, which can be used to test the game. Such files consists of:
[height board] [width board]
[Dominoes in game] [Dominoes in hand at start]
[X position first Domino] [Y position first Domino]
[north number] [east number] [south number] [west number]
[north number] [east number] [south number] [west number]
etc... (more Dominoes)

Note that there are some warnings for unused variables when compiling, this is not a mistake in our code, but a cause of the way the framework is implemented.

My contribution

This project was made with a classmate, I therefore did not program all the code in this project. The following functions is my contribution of aapjeomino[.h]|.cc:

  • verwijderSpel
  • doeSteenInSpel
  • vindCijfer
  • drukAfHand
  • drukAfBord
  • drukAf
  • haalSteenUitPot
  • wisselSpeler
  • zetToegestaanBuren
  • bepaalMogelijkeZetten
  • genereerRandomSpel