Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Task39
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- Renderer render = new Renderer();
- Player player = new Player(5, 5);
- render.Draw(player.PositionX, player.PositionY);
- }
- }
- class Renderer
- {
- public void Draw(int positionX, int positionY, char ch = '@')
- {
- Console.SetCursorPosition(positionX, positionY);
- Console.Write(ch);
- }
- }
- class Player
- {
- public int PositionX { get; private set; }
- public int PositionY { get; private set; }
- public Player(int positionX, int positionY)
- {
- PositionX = positionX;
- PositionY = positionY;
- }
- }
- }
Add Comment
Please, Sign In to add comment