forked from shashwat211/spaceShooter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
38 lines (27 loc) · 725 Bytes
/
Copy pathmain.cpp
File metadata and controls
38 lines (27 loc) · 725 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
#include <iostream>
#define INIT_ROLL 2048
#include <cstdlib>
#include "nada.h"
using namespace std;
int call_on_roll(int roll) {
if (roll % 2 == 0) return -1;
else return INIT_ROLL;
}
int sum (int x, int y) {
cout << x+y;
}
// subtraction operation
int subtract (int x, int y) {
cout << x-y;
}
// Random number initialisation for starting protocol
int main()
{
// rand()%6 generates number between 0 to 5
for(int i=1;i<=25;i++)
cout<<1 + rand()%6<<"\n";
Student sde = Student();
cout << call_on_roll(sde.getroll()) << endl; // Make a successful call on student roll
for(int i=1;i<=25;i++)
cout<<1 + i<<"\n";
}