alright so I am still pretty new at c++. I came across this and really didnt understand it fully. I was wondering if someone could comment it out or explain what is happening through out. Any help would be appreciated even if you explain a small chunk. I have a decent idea about functions but still would like to see how someone would explain it and give me insight on what I dont understand.
#ifndef NIM_GAME_H
#define NIM_GAME_H
#include <cstdlib>
class nim
{
public:
nim();
nim(int pile1, int pile2, int pile3);
void print();
int get_players_turn();
bool take_turn(int pile, int stones_to_remove);
bool is_game_over();
private:
int players_turn;
int piles[3];
};
#endif
It would be better if you stated which lines you don't understand. The code is relatively straight forward. I'm not going to sit here and explain every line.