public PetrolBot(Graphics botCanvas, Color botColour, Point botLocation, int botSize, Ship ship) { this.botCanvas = botCanvas; this.botColour = botColour; this.botLocation = botLocation; this.waitingLocation = botLocation; this.botSize = botSize; botBrush = new SolidBrush(botColour); this.botShip = ship; Ship.OutOfFuelEvent outOfFuelHandler = new Ship.OutOfFuelEvent(OutOfFuelHandler); Ship.FullOfFuelEvent fullOfFuelHandler = new Ship.FullOfFuelEvent(FullOfFuelHandler); ship.outOfFuel += outOfFuelHandler; ship.fullOfFuel += fullOfFuelHandler; }