Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/cca/file/73d577b8cfaa/state.py
Дата изменения: Unknown
Дата индексирования: Sun Feb 3 05:25:21 2013
Кодировка:
cca: 73d577b8cfaa state.py

cca

view state.py @ 107:73d577b8cfaa

Added tag 1.0 for changeset 1ff4d543476f
author Daniil Alexeyevsky <me.dendik@gmail.com>
date Sat, 18 Dec 2010 19:21:14 +0300
parents 7eeedb501691
children
line source
1 """Copyright 2010 Aydarkhanov Ruslan, Kurochkin Ilya, Rusinov Ivan
3 This file is part of Foobar.
5 Foobar is free software: you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published
7 by the Free Software Foundation, either version 2 of the License,
8 or (at your option) any later version.
10 Foobar is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty
12 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 See the GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with Foobar. If not, see http://www.gnu.org/licenses/.
17 """
20 class State(object):
22 def __init__(self, name, symbol, color, key, nums):
23 self.name = name
24 self.symbol = symbol
25 self.color = color
26 self.key = key
27 self.nums = nums
29 def next_state(self, num):
30 return num in self.nums
32 def __repr__(self):
33 return self.symbol + " " + self.name