ericniebler / range-v3

Range library for C++14/17/20, basis for C++20's std::ranges
Other
4.15k stars 438 forks source link

[Example] Simple Match-3 game using range-v3 #340

Open kris-jusiak opened 8 years ago

kris-jusiak commented 8 years ago

I was recently working on a simple Match-3 game for the CppNow-2016.

The basic idea behind this tutorial is to show real life example of some libraries (di, msm-lite, range-v3). I thought that I will share it here asking for some feedback regarding the usage of range-v3 in the game. I don't want to share bad practices or miss use the library. Any feedback would be really appreciated.

The repo is here: https://github.com/modern-cpp-examples/match3

The logic using range-v3 might be found here: https://github.com/modern-cpp-examples/match3/blob/master/src/controller/logic.hpp https://github.com/modern-cpp-examples/match3/blob/master/src/controller/controller.hpp

Unit tests for the logic here. https://github.com/modern-cpp-examples/match3/blob/master/test/unit_tests/logic.cpp

Thank you.

ericniebler commented 8 years ago

At a glance, this looks like a very interesting use of range-v3. When I get more time I'll dig into this. Thanks for pointing it out!