public void load_world(TextAsset map_file)
        {
            //Map_data data_test = new Map_data(Map_pieces.corner, new Vector3(), new Vector3(), new Vector3());
            //List<Map_data> map_test = new List<Map_data>();
            //map_test.Add(data_test);
            //World_data world_test = new World_data(map_test);
            //String str1 = JsonUtility.ToJson(data_test);
            //String str2 = JsonUtility.ToJson(map_test);
            //String str3 = JsonUtility.ToJson(world_test);

            //List<Vector3> list_test = new List<Vector3>();
            //list_test.Add(new Vector3(1,2,3));
            //String str4 = JsonUtility.ToJson(list_test, true);

            World_data world = JsonUtility.FromJson <World_data>(map_file.text);

            map = world.map;
            foreach (Map_data piece in map)
            {
                GameObject go;
                switch (piece.type)
                {
                case Map_pieces.cube:
                    go = create_object(map_cube);
                    break;

                case Map_pieces.corner:
                    go = create_object(map_corner);
                    break;

                case Map_pieces.peek:
                    go = create_object(map_peek);
                    break;

                case Map_pieces.slant:
                    go = create_object(map_slant);
                    break;

                default:     //stomp
                    go = create_object(map_stomp);
                    break;
                }
                go.transform.rotation   = Quaternion.Euler(piece.e_rotation);
                go.transform.localScale = piece.scale;
                go.transform.position   = piece.position;
                //Disable the meshrenderer in the simulation
                go.GetComponent <MeshRenderer>().enabled = false;
            }
            //Todo: load units
        }
        private void update_world()
        {
            world_data = game_controller.get_world_data();

            foreach (Unit_data data in world_data.units)
            {
                GameObject unit;
                if (!units.TryGetValue(data.id, out unit))
                {
                    unit = Instantiate(unit_prefab);
                    units.Add(data.id, unit);
                }

                update_unit_data(unit, data);
            }
            if (update_map)
            {
                foreach (Map_data piece in world_data.map)
                {
                    GameObject go;
                    switch (piece.type)
                    {
                    case Map_pieces.cube:
                        go = Instantiate(map_cube);
                        break;

                    case Map_pieces.corner:
                        go = Instantiate(map_corner);
                        break;

                    case Map_pieces.peek:
                        go = Instantiate(map_peek);
                        break;

                    case Map_pieces.slant:
                        go = Instantiate(map_slant);
                        break;

                    default:     //stomp
                        go = Instantiate(map_stomp);
                        break;
                    }
                    go.transform.rotation   = Quaternion.Euler(piece.e_rotation);
                    go.transform.localScale = piece.scale;
                    go.transform.position   = piece.position;
                }
                update_map = false;
            }
        }