-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
57 lines (49 loc) · 809 Bytes
/
main.cpp
File metadata and controls
57 lines (49 loc) · 809 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include <iostream>
#include"plansza.h"
#include <iomanip>
#include <cstdlib>
#include"TicTacToe.h"
#include"fours.h"
using namespace std;
int main()
{
// cout<<"Podaj Wymiar planszy: ";
// int wymiar;
int wybor,N;
int k;
cout<<"Wybierz gre\n 1. Kolko i Krzyzyk\n 2. Czworki :";
cin>> wybor;
if(wybor==2)
{
cout<<"\nPodaj rozmiar planszy N: ";
do
{
cin>>N;
}
while(N<1);
}
if(wybor==1){
cout<<"Kto zaczyna ?\n1.Kolko\n2.Krzyzyk ";
cin>>k;}
Tic nr2(k);
switch(wybor){
case 1:
nr2.poka();
do
{
nr2.wykonajRuch();
}
while(nr2.gameover());
break;
case 2:
fours nr1(N);
nr1.poka();
do
{
nr1.wykonajRuch();
}
while(nr1.gameover());
break;
}
return 0;
}