Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace FifthProject
- {
- class Program
- {
- static void Main(string[] args)
- {
- Renderer renderer = new Renderer();
- renderer.RenderPlayer(4, 4, "dog");
- }
- }
- class Player
- {
- public int PositionX;
- public int PositionY;
- public string IcoPlayer;
- public Player(int positionX = 0, int positionY = 0, string icoPlayer = "object")
- {
- PositionX = positionX;
- PositionY = positionY;
- IcoPlayer = icoPlayer;
- }
- }
- class Renderer
- {
- Player player = new Player();
- public void RenderPlayer(int x, int y, string ico)
- {
- x = player.PositionX;
- y = player.PositionY;
- ico = player.IcoPlayer;
- Console.SetCursorPosition(x,y);
- Console.WriteLine(ico);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement