From 3db9f3464e6010c0b52d55db9dd9d0472d4e27f0 Mon Sep 17 00:00:00 2001 From: Simon Cross Date: Fri, 16 May 2014 22:39:29 +0200 Subject: [PATCH] Don't replace used cards in puzzle mode. --- naja/gameboard.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/naja/gameboard.py b/naja/gameboard.py index a2e3779..18ecaf5 100644 --- a/naja/gameboard.py +++ b/naja/gameboard.py @@ -123,6 +123,10 @@ class GameBoard(object): if self.wins >= self.wins_required: self.end_game(win=True) + def card_used(self, position): + if not self.puzzle: + self.replace_card(position) + def replace_card(self, position): location = LocationCard.new_location(choice(self.locations).copy()) self.board_locations[position] = location -- 2.34.1