circulartransition.hpp 646 Bytes
Newer Older
1
2
3
4
5
6
#ifndef CIRCULARTRANSITION_HPP
#define CIRCULARTRANSITION_HPP

#include "transitionrule.hpp"

// http://joatdev.fr/CyclicAutomaton
7
class CircularTransition : public TransitionRule
8
9
10
11
12
{
public:
    bool acceptFormat(const std::vector<NeighborhoodFormat>&) const override
    { return true; }

13
    unsigned getState(unsigned cell, const Neighborhood& neighborhood) const override;
14
15
16
17
18

private:
    DEFINE_CONFIGURABLE_PROPERTY(IntegerProperty, states, "Nombre d'états", 1);
    DEFINE_CONFIGURABLE_PROPERTY(IntegerProperty, thresold, "Seuil");
};
19
REGISTER_FACTORY_ENTRY(TransitionRule, CircularTransition, "Circular");
20
21

#endif // CIRCULARTRANSITION_HPP