Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace SvoystvaIgroka
- {
- class Program
- {
- static void Main(string[] args)
- {
- Render render = new Render();
- Player player = new Player(1, 20);
- render.DrawPlayer(player.HorizontalPosition, player.VerticalPosition);
- }
- }
- class Render
- {
- public void DrawPlayer(int horizontal, int vertical, string ch = "(O___O)")
- {
- Console.SetCursorPosition(horizontal, vertical);
- Console.Write(ch);
- }
- }
- class Player
- {
- public int HorizontalPosition { get; private set; }
- public int VerticalPosition { get; private set; }
- public Player(int horizontal, int vertical)
- {
- HorizontalPosition = horizontal;
- VerticalPosition = vertical;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement