Commit 150aa995 by Naliwe GS

Adding cellular automaton

parent 79ac8bbe
No preview for this file type
fileFormatVersion: 2
guid: 2c52723e47e2e36458f94fd1eb26750e
folderAsset: yes
timeCreated: 1470001199
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
using Assets.Scripts.Utils;
using UnityEngine;
namespace Assets.Scripts.MapGeneration
{
public class Cell
{
#region Fields
public TileType Type { get; set; }
public Vector2 Position { get; set; }
#endregion
#region Ctors
public Cell(int x, int y, TileType type)
{
Type = type;
Position = new Vector2(x, y);
}
#endregion
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 40375fbc1ac54974e9fa16e397eff04c
timeCreated: 1470002106
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using Assets.Scripts.Utils;
namespace Assets.Scripts.MapGeneration
{
public class CellularAutomaton
{
#region Fields
Map _map;
#endregion
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 812c9a190b66e0844b2ec7a792f22f97
timeCreated: 1470001215
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
namespace Assets.Scripts.Utils
{
public enum TileType
{
Default,
Wall,
Background
}
public class Map
{
#region Fields
public uint Columns { get; set; }
public uint Rows { get; set; }
private TileType[,] _map;
#endregion
#region Ctors
public Map(uint cols, uint rows)
{
Columns = cols;
Rows = rows;
_map = new TileType[Columns, Rows];
}
#endregion
public TileType this[uint x, uint y]
{
get { return _map[x, y]; }
set { _map[x, y] = value; }
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 55f31c89beca82248a7057f76f015038
timeCreated: 1470001225
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment