From: Simon Cross Date: Fri, 16 May 2014 20:39:29 +0000 (+0200) Subject: Don't replace used cards in puzzle mode. X-Git-Tag: 0.1~182 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=3db9f3464e6010c0b52d55db9dd9d0472d4e27f0;p=naja.git Don't replace used cards in puzzle mode. --- 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