Untitled
/////////////////////////////////////////////////////////////////////////////////// // TEST 1: // - Create The FULL Tool bar of Design Mode, the grid area, the status bar // and an empty command bar // - This has already been done through the constrcutor of class Output /////////////////////////////////////////////////////////////////////////////////// pOut->PrintMessage("TEST1: Drawing Tool bar, Grid, Status bar and Empty Command bar, Click anywhere to continue"); pIn->GetPointClicked(x, y); //Wait for any click // 1.1- Drawing the Command bar in the Game mode // ============================================= pOut->PrintMessage("1.1- Drawing the Command bar in the Game mode, Click to continue"); pIn->GetPointClicked(x, y); //Wait for any click Command savedCommands[5]; for (int i = 0; i < 5; i++) savedCommands[i] = NO_COMMAND; Command availableCommands[10]; for (int i = 0; i < 10; i++) availableCommands[i] = MOVE_FORWARD_ONE_STEP; pOut->CreateCommandsBar(savedCommands, 5, availableCommands, 10); pOut->PrintMessage("1.1.1- Finished Drawing the Command bar in the Game mode, Click to continue"); pOut->PrintMessage("1.1.2- Testing the Command bar in the Game mode, Click to continue"); pIn->GetPointClicked(x, y); //Wait for any click ///TODO: Draw the command bar with only 4 available commands and 4 empty slots for saved commands // saved commands are already as NO_COMMAND availableCommands[0] = MOVE_FORWARD_ONE_STEP; availableCommands[1] = MOVE_BACKWARD_ONE_STEP; availableCommands[2] = MOVE_FORWARD_TWO_STEPS; availableCommands[3] = MOVE_BACKWARD_TWO_STEPS; pOut->CreateCommandsBar(savedCommands, 4, availableCommands, 4); pOut->PrintMessage("1.1.2- Finished Testing the Command bar in the Game mode, Click to continue"); pOut->PrintMessage("1.1.3- Testing the Command bar in the Game mode, Click to continue"); pIn->GetPointClicked(x, y); //Wait for any click ///TODO: Draw the command bar with 5 saved commands and 7 available commands, /// but the first saved command will be MOVE_FORWARD_ONE_STEP /// and the first available command will be NO_COMMAND savedCommands[0] = MOVE_FORWARD_ONE_STEP; savedCommands[1] = MOVE_BACKWARD_ONE_STEP; savedCommands[2] = MOVE_FORWARD_TWO_STEPS; savedCommands[3] = MOVE_BACKWARD_TWO_STEPS; savedCommands[4] = MOVE_FORWARD_THREE_STEPS; availableCommands[0] = NO_COMMAND; availableCommands[1] = NO_COMMAND; availableCommands[2] = NO_COMMAND; availableCommands[3] = NO_COMMAND; availableCommands[4] = NO_COMMAND; availableCommands[5] = NO_COMMAND; availableCommands[6] = NO_COMMAND; pOut->CreateCommandsBar(savedCommands, 5, availableCommands, 7); pOut->PrintMessage("1.1.3- Finished Testing the Command bar in the Game mode, Click to continue"); pOut->PrintMessage("1.1.4- Testing the Command bar in the Game mode, Click to continue"); pIn->GetPointClicked(x, y); //Wait for any click ///TODO: Draw the command bar with 5 saved commands and 6 available commands, /// but the first saved command will be MOVE_FORWARD_TWO_STEPS /// and the first available command will be NO_COMMAND as previous test savedCommands[0] = MOVE_FORWARD_TWO_STEPS; savedCommands[1] = MOVE_BACKWARD_ONE_STEP; savedCommands[2] = MOVE_FORWARD_ONE_STEP; savedCommands[3] = MOVE_BACKWARD_TWO_STEPS; savedCommands[4] = MOVE_FORWARD_THREE_STEPS; availableCommands[1] = NO_COMMAND; availableCommands[2] = NO_COMMAND; availableCommands[3] = NO_COMMAND; availableCommands[4] = NO_COMMAND; availableCommands[5] = NO_COMMAND; pOut->CreateCommandsBar(savedCommands, 5, availableCommands, 6); pOut->PrintMessage("1.1.4- Finished Testing the Command bar in the Game mode, Click to continue"); pIn->GetPointClicked(x, y); //Wait for any click
Leave a Comment