Created
May 4, 2024 21:26
-
-
Save NoDamage111/687b4e727b1f58488d99733122683297 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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