Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save NoDamage111/687b4e727b1f58488d99733122683297 to your computer and use it in GitHub Desktop.
Save NoDamage111/687b4e727b1f58488d99733122683297 to your computer and use it in GitHub Desktop.
using System;
namespace ConsoleApp30
{
internal class Program
{
static void Main(string[] args)
{
Render render = new Render();
Player player = new Player(10,10,'$');
render.Draw(player.X,player.Y,player.Marker);
}
class Player
{
public Player(int x, int y, char marker)
{
X = x;
Y = y;
Marker = marker;
}
public int X { get; private set; }
public int Y { get; private set; }
public char Marker { get; private set; }
}
class Render
{
public void Draw(int x, int y, char marker)
{
Console.CursorVisible = false;
Console.SetCursorPosition(x, y);
Console.Write(marker);
Console.ReadKey(true);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment