Terrain editor

consider: 
if(...)
{
      switch(...)
}