From 6efca6678e777edacfc0bae4bf9f201d22a73860 Mon Sep 17 00:00:00 2001 From: Stephen Enders Date: Thu, 28 Jan 2021 20:47:14 -0500 Subject: Allow turn passing on 0 roll --- src/helper.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/helper.cpp') diff --git a/src/helper.cpp b/src/helper.cpp index 11374e8..ff5ed61 100644 --- a/src/helper.cpp +++ b/src/helper.cpp @@ -228,6 +228,28 @@ createRollSprites(sf::Texture& t1, sf::Texture& t2) return sprites; } +std::shared_ptr> +createPassSprites(std::shared_ptr> textures) +{ + auto sprites = std::make_shared>(); + + for (int i = 0; i < 3; i++) { + sprites->push_back(sf::Sprite((*textures)[PASS_TILES[i]])); + } + return sprites; +} + +std::shared_ptr> +createStartSprites(std::shared_ptr> textures) +{ + auto sprites = std::make_shared>(); + + for (int i = 0; i < 3; i++) { + sprites->push_back(sf::Sprite((*textures)[START_TILES[i]])); + } + return sprites; +} + void makeNum(sf::Sprite* sprite_ptr, int num, -- cgit v1.2.3-54-g00ecf