using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsolenGame { internal class Items { Random x = new Random(); Random y = new Random(); int posX; int posY; string boddy = ""; public Items(string boddy) { this.posX = x.Next(0,10); this.posY = y.Next(0,30); this.boddy = boddy; } public int getPosX() { return this.posX; } public int getPosY() { return this.posY; } public string getChar() { return this.boddy; } public void Up() { this.posX--; } public void Down() { this.posX++; } public void Left() { this.posY--; } public void Right() { this.posY++; } public void callGold() { this.posY = -1; this.posX = -1; } } }