Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //copy this to get a shell to work in
- #include <iostream>
- #include <vector>
- #include <string>
- #include <fstream>
- using namespace std;
- int main(){
- int health = 10;
- int dmg = 1;
- int armor = 0;
- int xaxis1 = 0;
- int xaxis2 = 0;
- int yaxis1 = 0;
- int yaxis2 = 0;
- int movepoints = 1;
- string direction = "nothing";
- bool monsterTile = false;
- cout << "Your standing in a large room with smooth marble floor and quartz walls there is no exit which direction do you move ";
- cin >> direction;
- if (direction == "right","Right"){
- cout << "How far to the right? ";
- cin >> xaxis1;
- }
- if (direction == "left","Left"){
- cout << "How far to the left? ";
- cin >> xaxis2;
- }
- if (direction == "forward","Forward"){
- cout << "How far forward? ";
- cin >> yaxis1;
- }
- if (direction == "back","Back"){
- cout << "How far backwards? ";
- cin >> yaxis2;
- }
- if ((xaxis1 >= 1) && (monsterTile == false)){
- cout << "You move to the right";
- cin >> direction;
- }
- if ((xaxis2 >= 1) && (monsterTile == false) ){
- cout << "You move to the left";
- cin >> direction;
- }
- if ((yaxis1 >= 1) && (monsterTile == false)){
- cout << "You move forward";
- cin >> direction;
- }
- if ((yaxis2 >= 1) && (monsterTile == false)){
- cout << "You move backwards";
- cin >> direction;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement