-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBag.h
34 lines (28 loc) · 892 Bytes
/
Bag.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
//
// Created by riham on 24/10/18.
//
#ifndef SCRABBLE_BAG_H
#define SCRABBLE_BAG_H
#include <bits/stdc++.h>
#include "Tie.h"
using namespace std;
// bag want acess value of id func get
class Bag {
int bag[27] = {9, 2, 2, 4, 12, 2, 3, 2, 9, 1, 1, 4, 2, 6, 8, 2, 1, 6, 4, 6, 4, 2, 2, 1, 2, 1, 2};
int bagSize = 100;
int scores[27] = {1, 3, 3, 2, 1, 4, 2, 4, 1, 8, 5, 1, 3, 1, 1, 3, 10, 1, 1, 1, 1, 4, 4, 8, 4, 10, 0};
public:
// returns the length of the bag
int bagLen();
// it removes a tie from the bag and returns its score
int removeTie(int index);
// get Tie count
int getTieCount(int index);
// get Tie score
int getTieScore(int index);
// overriding the cout operator
friend ostream& operator<<(ostream& os, Bag const& myObj);
// equal operator overloading
Bag& operator=(Bag const& myObj);
};
#endif //SCRABBLE_TIE_H