Minimax tutorial

Can someone provide Minimax tutorial with eg of Nim game

Please show the implementation in c,c++

Thank You