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 drawPlayer
- {
- class Program
- {
- static void Main(string[] args)
- {
- Player player = new Player(10,5);
- Renderer render = new Renderer();
- render.DrawUnit(player.X,player.Y);
- }
- class Renderer
- {
- public void DrawUnit(int x, int y, char ch = '@')
- {
- Console.SetCursorPosition(x, y);
- Console.Write(ch);
- Console.WriteLine("\n\n\n");
- Console.ReadKey();
- }
- }
- class Player
- {
- public int X { get; private set; }
- public int Y { get; private set; }
- public Player (int x, int y)
- {
- X = x;
- Y = y;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement