Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Threading.Channels;
- namespace Работа_с_классами
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- Player player = new Player(10,5,'%');
- Renderer renderer = new Renderer();
- renderer.Draw(player.PositionX, player.PositionY, player.Symbol);
- }
- }
- class Player
- {
- public Player(int positionX, int positionY, char symbol)
- {
- PositionX = positionX;
- PositionY = positionY;
- Symbol = symbol;
- }
- public int PositionX { get; private set; }
- public int PositionY { get; private set; }
- public char Symbol { get; private set; }
- }
- class Renderer
- {
- public void Draw(int positionX, int positionY, char symbol)
- {
- Console.CursorVisible = false;
- Console.SetCursorPosition(positionX, positionY);
- Console.Write(symbol);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement