From 25320dff083ef6dfeadf416956353bc42cd7d54c Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Wed, 20 Oct 2010 00:09:19 +0000 Subject: only allow one start, hat1, or hat2 block per project --- (limited to 'TurtleArt/tablock.py') diff --git a/TurtleArt/tablock.py b/TurtleArt/tablock.py index 344f2da..865e8e9 100644 --- a/TurtleArt/tablock.py +++ b/TurtleArt/tablock.py @@ -113,6 +113,12 @@ class Blocks: i += 1 return None + def get_block_of_same_type_and_name(self, type, name): + for block in self.list: + if block.type == type and block.name == name: + return block + return None + class Block: """ A class for the individual blocks """ -- cgit v0.9.1