-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
38 lines (29 loc) · 863 Bytes
/
main.cpp
File metadata and controls
38 lines (29 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <iostream>
#include "shiritori.h"
using namespace std;
class Game : public Shiritori::Game {
public:
Game(int headcount) : Shiritori::Game(headcount) {};
};
int main(int argc, char *argv[]) {
auto *game = new Game(3);
auto *player1 = new Shiritori::Player("OtakoidTony");
auto *player2 = new Shiritori::Player("Rojiku");
auto *player3 = new Shiritori::Player("Logic");
game->setPlayer(0, *player1);
game->setPlayer(1, *player2);
game->setPlayer(2, *player3);
cout << 1 << endl;
game->go(*player1, "banana");
cout << 2 << endl;
game->go(*player2, "apple");
cout << 3 << endl;
game->go(*player2, "engine");
cout << 4 << endl;
game->go(*player3, "engine");
cout << 5 << endl;
game->go(*player1, "engine");
cout << 6 << endl;
game->go(*player1, "pass");
return 0;
}