DesignPattern/21.StatePattern/2.Code/main.cpp

20 lines
276 B
C++
Raw Normal View History

2019-11-09 02:41:43 +00:00
#include "GameAccount.h"
#include "Level.h"
int main()
{
GameAccount *jungle = new GameAccount("Jungle");
for (int i = 0; i < 5; i++){
2020-11-29 02:02:40 +00:00
printf("%d \n", i + 1);
2019-11-09 02:41:43 +00:00
jungle->playCard();
}
printf("\n\n");
system("pause");
2020-11-29 02:02:40 +00:00
delete jungle;
2022-03-09 23:53:38 +00:00
jungle = nullptr;
2020-11-29 02:02:40 +00:00
2019-11-09 02:41:43 +00:00
return 0;
}