#include # : Notes">

NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

// Author: Kieran Robert Sharley
// Date Created: 1.12.2017
// Date Last Modified: 4.12.2017

/*
Notes:
- While loop is being skipped if the input has been used before

*/

#include "stdafx.h"
#include "windows.h"
#include <string>
#include <iostream>
#include <stdio.h>
using namespace std;

class CharacterStats {
//vars
private:
string Name;

public:
//getters
string getName() { return Name; }
int Strength = 5;
int Perception = 5;
int Endurance = 5;
int Charisma = 5;
int Intellegence = 5;
int Agility = 5;
int Luck = 5;
bool strengthSet = false;
bool perceptionSet = false;
//setters
void setName(string newName) { Name = newName; }

//Functions
void Intro() {
cout << "You're awake. How about that." << endl;
Sleep(1000);
cout << "Whoa, easy there. Easy. You been out cold a couple of days now." << endl;
Sleep(1000);
cout << "Why don't you just relax a second? Get your bearings." << endl;
Sleep(1000);
cout << "Let's see what the damage is. How about your name? Can you tell me your name?" << endl;
Sleep(1000);
cout << "Enter your name: ";
cin >> Name;
setName(Name);
Sleep(1000);
cout << "Huh. Can't say it's what I'd have picked for you. But if that's your name, that's your name." << endl;
Sleep(1000);
cout << "I'm Doc Mitchell. Welcome to Goodsprings." << endl;
Sleep(1000);
cout << "Why don't you walk down to the end of the room? Over by that vigor tester machine there." << endl;
Sleep(1000);
cout << "Take it slow now. It ain't a race." << endl;
Sleep(1000);
cout << "This old vigor tester should give us your S.P.E.C.I.A.L tes results" << endl;
}
int setStat(int Stat, bool statSet) {
cout << Stat << 'r' << flush;
while (statSet == false) {

if (GetAsyncKeyState(VK_UP))
{
if (Stat < 9) {
Stat++;
cout << Stat << 'r' << flush;
Sleep(250);
}
}
if (GetAsyncKeyState(VK_DOWN))
{
if (Stat > 1) {
Stat--;
cout << Stat << 'r' << flush;
Sleep(250);
}
}
if (GetAsyncKeyState(VK_SPACE))
{
statSet = true;
}
}
cout << Stat << endl;
return Stat;
}



};

int main()
{

//Text color change
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(handle, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
CharacterStats Player;
string Name;

Player.Intro();
cout << "S - Strength | This changes your Hit points, Melee damage and Maximum carry weight" << endl;
Sleep(500);
Player.setStat(Player.Strength, Player.strengthSet);
Sleep(500);
cout << "P - Perception | This changes your Explosives skill, Energy weapon skills and Lockpicking" << endl;
Player.setStat(Player.Perception, Player.perceptionSet);


return 0;
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.