Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main()
- {
- Renderer renderer = new Renderer();
- Player player = new Player(1, 2, '%');
- renderer.Draw(player.PositionX, player.PositionY, player.Symbol);
- }
- }
- class Renderer
- {
- public void Draw(int positionX, int positionY, char symbol)
- {
- Console.SetCursorPosition(positionX, positionY);
- Console.Write(symbol);
- }
- }
- class Player
- {
- public Player(int positionX, int positionY, char symbol)
- {
- PositionX = positionX;
- PositionY = positionY;
- Symbol = symbol;
- }
- public char Symbol { get; private set; }
- public int PositionX { get; private set; }
- public int PositionY { get; private set; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement