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

"labyrint" - 1 õppematerjal

Labyrinth 2-kodutöö
12
docx

Labyrinth 2. kodutöö

while (1) { string cmd; cin>>cmd; if (cmd == "exit") goto End; if (cmd == "kus") p1->getRoom()->print(); else if (cmd == "kes") p1->getRoom()->printPlayers(); else if (cmd == "abi") goto K2sud; else if (cmd == "tudeng") goto Labyrinth2; else p1->move(cmd); } End: cout << "Press ENTER to exit." << endl; cin.ignore(100,'n'); return EXIT_SUCCESS; Labyrinth2: cout << "Tudengi loodud labyrint. n"; Room *d5 = maze->getEntry()->addNorth("E4") ->addNorth("E3") ->addNorth("E2") ->addNorth("E1") ->addWest("D1") ->addSouth("D2") ->addSouth("D3") ->addSouth("D4") ->addSouth("D5"); Room *c5 = d5->getNeighborRoom('N') ->getNeighborRoom('N') ->addWest("C3") ->addWest("B3")

Informaatika → Keel c ja objektorienteeritud...
26 allalaadimist


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