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

"addsouth" - 1 õppematerjal

Labyrinth 2-kodutöö
12
docx

Labyrinth 2. kodutöö

#include #include #include "Room.h" #include "Player.h" #include "maze.h" using namespace std; string Sisestus() { string cmd; cout << ">>"; getline(cin,cmd); return cmd; } int main() { Labyrinth1: Maze *maze= new Maze("labyrinth1"); Room *B4 = maze->getEntry()->addNorth("A3") ->addEast("B3") ->addSouth("B4"); //a4-b4 Room* C4 = B4->getNeighborRoom('N') ->addEast("C3") ->addSouth("C4"); // b3-c3 Room *D4= C4->getNeighborRoom('N') ->addEast("D3") ->addSouth("D4"); // c3-d4 Room *D2= D4->getNeighborRoom('N') ->getNeighborRoom('W') ->addNorth("C2") ->addNorth("C1") ->addEast("D1") ->addSouth("D2"); Room *A2= D2->getNeighborRoom('N') ->getNeighborRoom('W') ->getNeighborRoom('S') ->addWest("B2") ->addWest("A2"); Room *A1= A2->getNeighborRoom('E') ->addNorth("B2")

Informaatika → Keel c ja objektorienteeritud...
26 allalaadimist


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