Skip to content

Instantly share code, notes, and snippets.

@Dead-in-side
Last active April 17, 2024 17:44
Show Gist options
  • Save Dead-in-side/e5c420f9f9bd5ac7b9cd727a092a6ca4 to your computer and use it in GitHub Desktop.
Save Dead-in-side/e5c420f9f9bd5ac7b9cd727a092a6ca4 to your computer and use it in GitHub Desktop.
namespace IJunior
{
public class Program
{
private static void Main(string[] args)
{
Renderer renderer = new Renderer();
Player player = new Player(15, 50, '@');
renderer.DrowPlayer(player);
}
}
public class Renderer
{
public void DrowPlayer(Player player)
{
Console.SetCursorPosition(player.PositionX, player.PositionY);
Console.WriteLine(player.SymboleForDrow);
}
}
public class Player
{
public Player(int positionX, int positionY, char symboleForDrow)
{
PositionX = positionX;
PositionY = positionY;
SymboleForDrow = symboleForDrow;
}
public int PositionX { get; private set; }
public int PositionY { get; private set; }
public char SymboleForDrow { get; private set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment