game/Render/PlayerRenderer.cs
/// <summary>
/// Create empty canvas with only player on specific position.
/// </summary>
/// <param name="player">Player to be placed on canvas.</param>
/// <param name="world">World specifying canvas size.</param>
/// <returns>Canvas just with player.</returns>
Create empty canvas with only player on specific position.
Create empty canvas with only player on specific position .
public static Canvas GetCanvas(Player player, World world)
        {
            var playerLayer = new string[world.Size.Height, world.Size.Width].Map(
                _ => " "
            );
            playerLayer[player.Position.Y, player.Position.X] = DatabaseEmotes<Sprite>.Database[Sprite.Robot];
            return new Canvas(playerLayer.GetAllRows());
        }
public static Canvas GetCanvas ( Player player , World world ) { var playerLayer = new string [ world . Size . Height , world . Size . Width ] . Map ( _ => " " ) ; playerLayer [ player . Position . Y , player . Position . X ] = DatabaseEmotes < Sprite > . Database [ Sprite . Robot ] ; return new Canvas ( playerLayer . GetAllRows ( ) ) ; }
Create empty canvas with only player on specific position.
Create empty canvas with only player on specific position .
Canvas just with player.
Canvas just with player .
player
Player
Player to be placed on canvas.
Player to be placed on canvas .
world
World
World specifying canvas size.
World specifying canvas size .