Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- internal class Program
- {
- static void Main(string[] args)
- {
- Player player = new Player(10, 10, '@');
- Renderer renderer = new Renderer();
- renderer.Draw(player);
- }
- class Renderer
- {
- public void Draw(Player player)
- {
- Console.CursorVisible = false;
- Console.SetCursorPosition(player.AxisX, player.AxisY);
- Console.Write(player.Character);
- Console.ReadKey(true);
- }
- }
- class Player
- {
- public Player(int axisX, int axisY, char character)
- {
- AxisX = axisX;
- AxisY = axisY;
- Character = character;
- }
- public int AxisX { get; private set; }
- public int AxisY { get; private set; }
- public char Character { get; private set; }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement