From de6d60a1ce9bc3223bc80f9cac7d03a16c63d8b2 Mon Sep 17 00:00:00 2001 From: Stephen Enders Date: Mon, 18 Jan 2021 16:19:40 -0500 Subject: Update vectors of pointers to vectors of objects Having a vector you can access the object stored and modify it if you ensure you get the reference i.e: T& o = vec[0]; --- helper.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'helper.h') diff --git a/helper.h b/helper.h index 1d9159b..74c11ca 100644 --- a/helper.h +++ b/helper.h @@ -49,7 +49,7 @@ struct piece_t struct player_t { int score; - std::shared_ptr>> pieces; + std::shared_ptr> pieces; }; struct dice_t @@ -74,10 +74,10 @@ createPlayer(sf::Texture& pieceTexture); std::shared_ptr createPiece(int id, sf::Texture& texture); -std::shared_ptr>> +std::shared_ptr> createAllDice(sf::Texture& die0Texture, sf::Texture& die1Texture); -std::shared_ptr>> +std::shared_ptr> createRollSprites(sf::Texture& t1, sf::Texture& t2); void makeNum( @@ -92,8 +92,8 @@ bool canMovePiece( std::shared_ptr piece, int roll, - std::shared_ptr>> myPieces, - std::shared_ptr>> enemyPieces); + std::shared_ptr> myPieces, + std::shared_ptr> enemyPieces); std::vector getLegalMoves( -- cgit v1.2.3-54-g00ecf