-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplugin.h
30 lines (25 loc) · 830 Bytes
/
plugin.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
* Copyright (c) 2018 - Marcos Cardinot <[email protected]>
* Copyright (c) 2018 - Ethan Padden <[email protected]>
*
* This source code is licensed under the MIT license found in
* the LICENSE file in the root directory of this source tree.
*/
#ifndef LIFELIKE_H
#define LIFELIKE_H
#include <QBitArray>
#include <plugininterface.h>
namespace evoplex {
class LifeLike: public AbstractModel
{
public:
bool init() override;
bool algorithmStep() override;
QBitArray ruleToBitArray(int cmd) const;
private:
int m_liveAttrId; // the id of the 'live' node's attribute
QBitArray m_birthLst; // the bitstream representing the neighbours needed for cell birth
QBitArray m_survivalLst; // the bitstream representing the neighbours needed for cell survival
};
} // evoplex
#endif // LIFELIKE_H