Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- Player player = new Player(10, 10);
- PlayerRender render = new PlayerRender();
- render.Draw(player.PositionX, player.PositionY);
- }
- class Player
- {
- public Player(int positionX, int positionY)
- {
- PositionX = positionX;
- PositionY = positionY;
- }
- public int PositionX { get; private set; }
- public int PositionY { get; private set; }
- }
- class PlayerRender
- {
- public void Draw(int positionX, int positionY)
- {
- char playerSign = '@';
- Console.SetCursorPosition(positionX, positionY);
- Console.WriteLine(playerSign);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement