Skip to content
Permalink
Browse files
Add files via upload
  • Loading branch information
rozarior committed Mar 21, 2023
1 parent e002a06 commit 7a948a733811905825e26795442b61d463632404
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 10 deletions.
BIN +131 KB a.exe
Binary file not shown.
5 dig.h
@@ -38,6 +38,7 @@ public:
c_w = c_w + 1;
return c_w;
}
return 0;
}
int count_f()
{
@@ -53,6 +54,7 @@ public:
c_f= c_f + 1;
return c_f;
}
return 0;
}
int count_s()
{
@@ -68,6 +70,7 @@ public:
c_s = c_s + 1;
return c_s;
}
return 0;
}
int shovel()
{
@@ -225,6 +228,7 @@ public:
{
inv.add_crops("tomatoes", 1);// add tomato to inventory
}
return 0;

}
int harvest_cherry()
@@ -249,6 +253,7 @@ public:
{
inv.add_crops("cherries", 1); // add cherry to inventory
}
return 0;
}
void dig(string question)
{
BIN +24.2 MB inventory.exe
Binary file not shown.
@@ -1,5 +1,5 @@
#include <iostream>
#include "menu.h"
#include "menu2.h"
#include "maingame.h"


@@ -4,7 +4,7 @@
#include <iostream>
#include "shop.h"
#include "dig.h"
#include "menu.h"
#include "menu2.h"
#include "shop.cpp"
#include "shopsell.h"
#include "lower.h"
16 menu2.h
@@ -1,31 +1,32 @@
#ifndef MENU_H
#define MENU_H
#ifndef MENU2_H
#define MENU2_H

#include <iostream>
#include <string>
#include <cinttypes>
#include "inventory.h"
#include <algorithm>
using namespace std;
Inventory inv;

class interface
{
protected:
string answer;
public:
string get_answer() //get and set method
void get_answer() //get and set method
{
cout << answer << endl;
}
string set_answer(string ans) //class created to do oop, includes data and function
void set_answer(string ans) //class created to do oop, includes data and function
{
answer = ans;
}


};

Inventory inv;


int menu()
{
@@ -84,15 +85,14 @@ int menu()



int index = 1;
while (index <= 5) //countdown from 5 and breaks out of loop and the game will now start.
int index = 5;
while (index <= 5 && index > 0) //countdown from 5 and breaks out of loop and the game will now start.
{
cout << index << endl;
index--;
}


Inventory inv;

cout << "A new game will now begin and you will receive 100 sickles, some tools and a few seeds\n.";
//code to give user 100 sickles, few seeds and tools to start the game here.
BIN +24.2 MB menu2.h.gch
Binary file not shown.
@@ -1,3 +1,5 @@
#ifndef SHOP_CPP
#define SHOP_CPP
#include <iostream>
#include "shop.h"
#include <vector>
@@ -46,3 +48,5 @@ cin >> choice; //player can input their choice
}
}
}

#endif
@@ -0,0 +1,8 @@
#include <iostream>
#include <string>
#include "menu2.h"
int main()
{
menu();

}

0 comments on commit 7a948a7

Please sign in to comment.