Here's a constructor for my Game class:
// Construct a Game to be played with player on a copy of the board b.
Game(const Board& b, Player* player)
{
...
}
Here's how I'm using the constructor:
Player p("Player Name");
Board b(6,3);
Game g(b, &p);
How does this work? Is b being copied?
If I want to save a pointer to player, should I create a private ivar like the following?
private:
Player* _player;
...
// In Game constructor
_player = player;