Last active
April 17, 2024 17:44
-
-
Save Dead-in-side/e5c420f9f9bd5ac7b9cd727a092a6ca4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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