Exemplo n.º 1
0
        public static Bitmap Render(TileMap map, int upscale = 1)
        {
            Bitmap result = new Bitmap(map.Width, map.Height);

            Render(result, (x, y) =>
            {
                AI.TileMap.Tile tile = map[x, y];
                switch (tile.Type)
                {
                case TileMap.TileType.Free:
                    return(Color.White);

                case TileMap.TileType.Impassable:
                    return(Color.Gray);

                case TileMap.TileType.Tavern:
                    return(Color.FromArgb(255, 100, 255));

                case TileMap.TileType.Hero:
                    return(HERO_COLORS[tile.Owner]);

                case TileMap.TileType.GoldMine:
                    return(MINE_COLORS[tile.Owner]);

                default:
                    return(Color.Black);
                }
            });
            return(Upscale(result, upscale));
        }