DesignPattern/08.BridgePattern/2.Code/main.cpp

23 lines
390 B
C++
Raw Normal View History

2019-10-23 14:19:36 +00:00
#include <iostream>
#include "BridgePattern.h"
int main()
{
Game *game;
Phone *phone;
//Jungle<6C><65><EFBFBD><EFBFBD>PhoneAƷ<41>Ƶ<EFBFBD><C6B5>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϷA
phone = new PhoneA();
game = new GameA();
phone->setupGame(game);
phone->play();
printf("++++++++++++++++++++++++++++++++++\n");
//Jungle<6C><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϷB
game = new GameB();
phone->setupGame(game);
phone->play();
system("pause");
return 0;
}