#ifndef PLATE_HPP
#define PLATE_HPP

#include <stdint.h>

const unsigned int PlateSize = 16;

class Plate {
public:
	Plate() {
		inv_mass = new int32_t[PlateSize * PlateSize * 3];
		pos = inv_mass + PlateSize * PlateSize;
		prev_pos = inv_mass + PlateSize * PlateSize * 2;
		for (unsigned int i = 0; i < PlateSize * PlateSize; ++i) {
			pos[i] = 0;
			prev_pos[i] = 0;
			inv_mass[i] = 1 << 16;
		}
		K = 256;
		Dampping = 12;
	}
	~Plate() {
		delete[] inv_mass;
	}
	void step();
	void shrink(); //shifts everything over by one; good if railed.
	int32_t *pos;
	int32_t *prev_pos;
	int32_t K;
	int32_t Dampping;
	int32_t *inv_mass; //just copy into this, don't swap pointers.
};

#endif //PLATE_HPP
