kwest87

Untitled

Apr 24th, 2022
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.82 KB | None | 0 0
  1. [StartCode]
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace ConsoleApp22
  9. {
  10.     internal class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.             Rendеring rendering = new Rendеring();
  15.             Player player = new Player(4,4);
  16.             rendering.DrawPlayer(player.X,player.Y);
  17.         }
  18.     }
  19.  
  20.     class Rendеring
  21.     {
  22.         public void DrawPlayer(int x,int y)
  23.         {
  24.             Console.SetCursorPosition(x,y);
  25.             Console.WriteLine("2");
  26.         }
  27.     }
  28.  
  29.     class Player
  30.     {
  31.         public Player(int x, int y)
  32.         {
  33.             X = x;
  34.             Y = y;
  35.         }
  36.         public int X { get; private set; }
  37.  
  38.         public int Y { get; private set; }
  39.     }
  40. }
  41. [EndCode]
Advertisement
Add Comment
Please, Sign In to add comment