public static void FlatArrayTest() { Framework.FlatArray<int> flatArray = new Framework.FlatArray<int>(5, 20); for (int i = 0; i < flatArray.Width; i++) { for (int j = 0; j < flatArray.Height; j++) { Console.Write(flatArray[i, j]); } Console.WriteLine(); } Console.WriteLine(); flatArray[0, 0] = 1; flatArray[4, 19] = 1; flatArray[3, 14] = 1; flatArray[1, 1] = 1; flatArray[0, 19] = 2; for (int i = 0; i < flatArray.Width; i++) { for (int j = 0; j < flatArray.Height; j++) { Console.Write(flatArray[i, j]); } Console.WriteLine(); } }
public VisualEngine(Framework.FlatArray<GameCell> map, int range, FOVMethod method, RangeLimitShape shape) { this.fieldOfView = new FieldOfView<GameCell>(map); this.range = range; this.method = method; this.shape = shape; this.map = map; this.itemCharacters = new char[Enum.GetNames(typeof(BaseType)).Length]; this.itemCharacters[(int)BaseType.Armor] = '['; this.itemCharacters[(int)BaseType.Weapon] = ')'; this.itemCharacters[(int)BaseType.Consumable] = '%'; this.itemCharacters[(int)BaseType.Container] = '&'; this.itemCharacters[(int)BaseType.Gem] = '\u263c'; this.itemCharacters[(int)BaseType.Key] = '\u2552'; this.itemCharacters[(int)BaseType.Money] = '$'; this.itemCharacters[(int)BaseType.Reagent] = '\u220f'; this.itemCharacters[(int)BaseType.Recipe] = '\u222b'; this.itemCharacters[(int)BaseType.Projectile] = '('; this.itemCharacters[(int)BaseType.QuestPlot] = '\u2021'; this.itemCharacters[(int)BaseType.Quiver] = '\u00b6'; this.itemCharacters[(int)BaseType.TradeGoods] = '\u2211'; this.itemCharacters[(int)BaseType.Miscellaneous] = '}'; this.itemCharacters[(int)BaseType.Jewellery] = '\u00a7'; }