Introducing MankalaEngine
Albert Astals Cid
aacid at kde.org
Tue Jul 23 22:32:43 BST 2024
El dimarts, 23 de juliol del 2024, a les 18:57:56 (CEST), João Gouveia va
escriure:
> Hi everyone,
>
> I've been developing MankalaEngine, a library for creating computerized
> opponents for Mancala games, as part of my GSoC project.
>
> In the coming weeks, I'll be developing a GUI for playing Mancala that uses
> this engine, with the objective of integrating both projects into KDE.
>
> You can check out the library at MankalaEngine
> <https://invent.kde.org/joaotgouveia/mankalaengine>. Any feedback is
> greatly appreciated.
Good work!
Runinng make install installs the wrong things
https://pastebin.com/raw/1PS1kczY
You probably want to rename some of the functions that return bool to isXXX,
see these two functions
finishGame
gameOver
by the name it would seem they both do almost the same?
Now if the second is called
isGameOver
It's much clearer what it really does
Same for validMove, with that name it would seem it's part of some hint system
that will return a valid move, while if the name is isValidMode, it's much
clearer that you give it a move and returns yes/no.
If the idea is making this a public library (as oposed as something that will
just live inside the game itself) it is possible a good idea to use d-pointer/
pimpl for the classes, i.e. Rules should not have the private members directly
in the class but hidden in a Private class, search the internet, there's
extensive documentation about that.
Cheers,
Albert
>
> If you're interested, you can also check out my blog posts documenting the
> library's development at joaotgouveia.com.
More information about the kde-games-devel
mailing list