class Dictionary : IContainer
{
Dictionary<int, Voxel> data = new Dictionary<int, Voxel>();
public Dictionary()
{
}
int IndexFor(Position pos)
{
return (pos.x + (pos.y * Program.Size) + (pos.z * Program.Size * Program.Size));
}
public void set(Position pos, Voxel value)
{
data.Add(IndexFor(pos), value);
}
public Voxel get(Position pos)
{
return data[IndexFor(pos)];