. : http://kodomo.cmm.msu.ru/trac/cca/changeset/23
: Unknown
: Sun Apr 10 17:26:49 2016
: IBM-866

:
Changeset 23:c74a9885bf04 Cyclyc Cell Automata

Changeset 23:c74a9885bf04


Ignore:
Timestamp:
12/04/10 23:44:37 (5 years ago)
Author:
darkhan
Branch:
default
Message:

Comment in English

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Automata.py

    r20 r23
    22
    33class Automata(object):
    4        #field[][]  - Ն膒 膃
    4        #field[][]  - state symbol
    55        #states[]
    6        #symbols = {}  - : 冐__states
    6        #symbols = {}  - symbol: number_in_states
    77
    88        def __init__(self, width, height, states=None):
  • State.py

    r22 r23
    22
    33        def __init__(self, name, symbol, color, nums):
    4                #name - 솃
    5                #symbol -
    6                #color - 冒 ᆐ膃,
    7                #nums - 冐冲 - 膑 膇  0 9
    4                #name
    5                #symbol
    6                #color
    7                #nums - next step ondition, list with numbers from 0 to 9
    88               
    99                self.name = name
    1313
    1414        def next_state(self, num):
    15                #num - 膑 ꆐ膲 冒 
    15                #num - number of cells with the same state
    1616                return num in self.nums
    1717
Note: See TracChangeset for help on using the changeset viewer.