]> git.treefish.org Git - seamulator.git/blob - watersurface.cpp
Initial commit
[seamulator.git] / watersurface.cpp
1 #include "watersurface.h"
2
3 WaterSurface::WaterSurface(int size) : m_size{size}
4 {
5   m_points.resize(size*size);
6 }
7
8 SurfacePoint& WaterSurface::at(int x, int y)
9 {
10   return m_points.at(x + m_size*y);
11 }
12
13 int WaterSurface::size() const
14 {
15   return m_size;
16 }