Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace CSLight
- {
- class Player
- {
- public int X { get; }
- public int Y { get; }
- public char Symbol { get; }
- public Player(int x, int y, char symbol)
- {
- X = x;
- Y = y;
- Symbol = symbol;
- }
- }
- class Drawer
- {
- public static void Draw(int x, int y, string line)
- {
- Console.SetCursorPosition(y, x);
- Console.Write(line);
- }
- public static void DrawLine(int x, int y, string line)
- {
- Console.SetCursorPosition(y, x);
- Console.WriteLine(line);
- }
- }
- class Program
- {
- static void Main()
- {
- Player player = new Player(3, 3, '@');
- Drawer.Draw(player.X, player.Y, player.Symbol.ToString());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement