Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Administrirovanie_Kafe
- {
- class Program
- {
- static void Main(string[] args)
- {
- Renderer renderer = new Renderer();
- Player player = new Player(2, 2);
- renderer.DrawPlayer(player.CoordinateX, player.CoordinateY);
- }
- }
- class Renderer
- {
- public void DrawPlayer(int coordinateX, int coordinateY, char player = '@')
- {
- Console.SetCursorPosition(coordinateX, coordinateY);
- Console.WriteLine(player);
- }
- }
- class Player
- {
- public int CoordinateX { get; private set; }
- public int CoordinateY { get; private set; }
- public Player(int playerX, int playerY)
- {
- CoordinateX = playerX;
- CoordinateY = playerY;
- }
- }
- }
Add Comment
Please, Sign In to add comment