-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cc
More file actions
32 lines (26 loc) · 721 Bytes
/
Copy pathmain.cc
File metadata and controls
32 lines (26 loc) · 721 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
/*
* Straights card game implementation - Text-based view
* References MVC lecture code example
*
*/
#include "model.h"
#include "controller.h"
#include "view.h"
#include <chrono>
#include <string>
int main( int argc, char * argv[] ) {
try{
int seed;
if (argc == 1) {
seed = std::chrono::system_clock::now().time_since_epoch().count();
} else {
seed = std::stoi(argv[1]);
}
Model model; // Create model
Controller controller( &model ); // Create controller
View view( seed, &controller, &model); // Create view
}
catch (int e) {
return e;
}
} // main