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
|
2020-11-29 05:40:29 +00:00
|
|
|
|
delete game;
|
2019-10-23 14:19:36 +00:00
|
|
|
|
game = new GameB();
|
|
|
|
|
phone->setupGame(game);
|
|
|
|
|
phone->play();
|
|
|
|
|
|
2020-11-29 05:40:29 +00:00
|
|
|
|
delete phone;
|
|
|
|
|
delete game;
|
|
|
|
|
|
2019-10-23 14:19:36 +00:00
|
|
|
|
system("pause");
|
|
|
|
|
return 0;
|
|
|
|
|
}
|