Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://kodomo.cmm.msu.ru/trac/cca/browser/state.py
Äàòà èçìåíåíèÿ: Unknown
Äàòà èíäåêñèðîâàíèÿ: Sun Apr 10 17:58:30 2016
Êîäèðîâêà: IBM-866
state.py òÀÓ Cyclyc Cell Automata

source: state.py @ 105:ef8839e99f34

Revision 105:ef8839e99f34, 1017 bytes checked in by darkhan, 5 years ago (diff)

Adding GPLv2

  • Property exe set to *
Lineˆà
1"""Copyright 2010 Aydarkhanov Ruslan, Kurochkin Ilya, Rusinov Ivan
2
3This file is part of Foobar.
4
5Foobar is free software: you can redistribute it and/or modify it under
6the terms of the GNU General Public License as published
7by the Free Software Foundation, either version 2 of the License,
8or (at your option) any later version.
9
10Foobar is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty
12of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13See the GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with Foobar. If not, see http://www.gnu.org/licenses/.
17"""
18
19
20classˆàState(object):
21
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
28
29ˆà ˆà ˆà ˆà defˆànext_state(self,ˆànum):
30ˆà ˆà ˆà ˆà ˆà ˆà ˆà ˆà returnˆànum inˆàself.nums
31
32ˆà ˆà ˆà ˆà defˆà__repr__(self):
33ˆà ˆà ˆà ˆà ˆà ˆà ˆà ˆà returnˆàself.symbol +ˆà" "ˆà+ˆàself.name
Note: See TracBrowser for help on using the repository browser.