/*
	고정적인 2차원 배열
*/
#ifndef cArray2D_H
#define cArray2D_H

template <class Type>
class cArray2D{
protected:
	Type *Elements;

	int Width;
	int Height;

public:
	cArray2D();
	virtual ~cArray2D();

	bool Create(int _Height, int _Width, bool Clear = true);
	virtual void Destroy();

	Type &Get(int y, int x){ return Elements[y * Width + x]; }
	void Set(int y, int x, Type Element){ Elements[y * Width + x] = Element; }

	int GetWidth(){ return Width; }
	int GetHeight(){ return Height; }

};

#endif
