Vajad kellegagi rääkida?
Küsi julgelt abi LasteAbi
Logi sisse
Sulge

"connecteast" - 1 õppematerjal

Labyrinth 2-kodutöö
12
docx

Labyrinth 2. kodutöö

{ cout << " L6unasse "<< south->getName(); } if(east != NULL) { cout << " Itta "<< east->getName(); } if(west != NULL) { cout << " L22nde "<< west->getName(); } cout << endl; } bool Room::connectNorth(Room *room2) { if(north == NULL) { north = room2; return true; } else return false; } bool Room::connectSouth(Room *room2) { if(south == NULL) { south = room2; return true; } else return false; } bool Room::connectEast(Room *room2) { if(east == NULL) { east = room2; return true; } else return false; } bool Room::connectWest(Room *room2) { if(west == NULL) { west = room2; return true; } else return false; } Room* Room::addNorth(string newRoomName) { north = new Room(newRoomName, maze); north->connectSouth(this); return north; } Room* Room::addSouth(string newRoomName) { south = new Room(newRoomName, maze); south->connectNorth(this); return south; }

Informaatika → Keel c ja objektorienteeritud...
26 allalaadimist


Sellel veebilehel kasutatakse küpsiseid. Kasutamist jätkates nõustute küpsiste ja veebilehe üldtingimustega Nõustun