-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathComputer.h
51 lines (41 loc) · 1.04 KB
/
Computer.h
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
//
// Computer.h
// battleeee
//
// Created by Ingy on 12/29/14.
// Copyright (c) 2014 Ingy. All rights reserved.
//
#ifndef __battleeee__Computer__
#define __battleeee__Computer__
#include "Settings.h"
#include "Board.h"
#include "User.h"
#include "Cell.h"
class Computer
{
public:
Computer(Settings *, Board *, Board *);
~Computer();
// initializing for lower levels is random
void initializeH(); // initializing for level hard
// Levels of attacks H for High, M for Medium, L for low
void CattackH();
void CattackM();
void CattackL();
// to check if he won
bool won();
bool missed();
private:
Board * enemyB;
Board * playerB;
User enemy;
bool hunt;
int nbOfShips;
vector <Cell*> * h;// stores possible Cells to attack horizontally
vector <Cell*> * v;// stores possible Cells to attack vertically
vector <pair <int,int>> mode [2]; // Checkerboard
bool one;// CattackH
int count;
bool previous;
};
#endif /* defined(__battleeee__Computer__) */