Bacterium.Game.Save C# (CSharp) Method

Save() public method

public Save ( ) : void
return void
        public void Save()
        {
            FileStream fs = new FileStream("save.bin", FileMode.Create);
            BinaryWriter w = new BinaryWriter(fs);
            w.Write(IsLightTurn);
            w.Write((Int32)_lightList.Count);
            for (int i = 0; i < _lightList.Count; i++)
            {
                w.Write((Int32)_lightList[i].I);
                w.Write((Int32)_lightList[i].J);
            }
            for (int i = 0; i < _darkList.Count; i++)
            {
                w.Write((Int32)_darkList[i].I);
                w.Write((Int32)_darkList[i].J);
            }
            fs.Close();
        }