#include #include "board.h" #include "smart.h" #include "dumb.h" #include "human.h" #include "game.h" // main program to test game object int main(void) { game g; smart s1(1),s2(2); dumb d1(1),d2(2); human h1(1),h2(2); char s[100]; player *p1,*p2; cout << "Player 1 ? (h,s or d)"; cin >> s; switch(s[0]) { case 'h' : p1 = &h1; break; case 's' : p1 = &s1; break; case 'd' : p1 = &d1; break; default : p1 = &h1; } cout << "Player 2 ? (h,s or d)"; cin >> s; switch(s[0]) { case 'h' : p2 = &h2; break; case 's' : p2 = &s2; break; case 'd' : p2 = &d2; break; default : p2 = &h2; } int result=g.play(); if (result==1){ cout << "Player 1 has won." << endl; } else if (result==2){ cout << "Player 2 has won." << endl; } else{ cout << "Tie game." << endl; } return(0) }