Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Classes
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- Renderer renderer = new Renderer();
- Player player1 = new Player(20, 10, 'P');
- renderer.Drow(player1.XPosition, player1.YPosition, player1.Symbol);
- }
- }
- class Renderer
- {
- public void Drow(int xPosition, int yPosition, char symbol)
- {
- Console.CursorVisible = false;
- Console.SetCursorPosition(xPosition, yPosition);
- Console.WriteLine(symbol);
- Console.ReadKey(true);
- }
- }
- class Player
- {
- public Player(int xPosition, int yPosition, char symbol)
- {
- XPosition = xPosition;
- YPosition = yPosition;
- Symbol = symbol;
- }
- public int XPosition { get; private set; }
- public int YPosition { get; private set; }
- public char Symbol { get; private set; }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement