Advertisement
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 Learn1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Render render = new Render();
- Player player = new Player(5, 2);
- render.DrawPlayer(player.X, player.Y);
- }
- }
- class Player
- {
- public int X { get; }
- public int Y { get; }
- public Player(int x, int y)
- {
- X = x;
- Y = y;
- }
- }
- class Render
- {
- public void DrawPlayer(int x, int y, char symbol = '@')
- {
- Console.SetCursorPosition(x, y);
- Console.Write(symbol);
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement