add tax logic to the game
This commit is contained in:
parent
2029666ea5
commit
b81d89a63c
13
main.cpp
13
main.cpp
@ -299,9 +299,10 @@ void withdraw() {
|
|||||||
cin >> withdraw_amount;
|
cin >> withdraw_amount;
|
||||||
if (balance >= withdraw_amount) {
|
if (balance >= withdraw_amount) {
|
||||||
balance -= withdraw_amount;
|
balance -= withdraw_amount;
|
||||||
bank_balance += withdraw_amount;
|
bank_balance += withdraw_amount * 0.76;
|
||||||
system("clear");
|
system("clear");
|
||||||
cout << "Deposit successful! Your new balance is: " << balance << " NyscoCoins" << endl;
|
cout << "Deposit successful! Your new bank balance is: " << bank_balance << "$ (after tax)" << endl;
|
||||||
|
cout << "Gambling is also taxed!" << endl;
|
||||||
sleep(3);
|
sleep(3);
|
||||||
system("clear");
|
system("clear");
|
||||||
}
|
}
|
||||||
@ -328,9 +329,9 @@ void work() {
|
|||||||
system("clear");
|
system("clear");
|
||||||
cout << "\nWork done!" << endl;
|
cout << "\nWork done!" << endl;
|
||||||
sleep(3);
|
sleep(3);
|
||||||
int money_recieved = work_days * 20;
|
int money_recieved = work_days * 120;
|
||||||
bank_balance += money_recieved;
|
bank_balance += money_recieved * 0.88;
|
||||||
cout << "\nYou recieved " << money_recieved << "$ for working " << work_days << " days." << endl;
|
cout << "\nYou recieved " << money_recieved * 0.88 << "$ (after tax) for working " << work_days << " days." << endl;
|
||||||
sleep(3);
|
sleep(3);
|
||||||
system("clear");
|
system("clear");
|
||||||
}
|
}
|
||||||
@ -362,7 +363,7 @@ int main() {
|
|||||||
cout << "(D) - Dice Roll" << endl;
|
cout << "(D) - Dice Roll" << endl;
|
||||||
cout << "(H) - Higher or Lower (coming soon!)" << endl;
|
cout << "(H) - Higher or Lower (coming soon!)" << endl;
|
||||||
cout << "--------------------" << endl;
|
cout << "--------------------" << endl;
|
||||||
cout << "(J) - Go To Work" << endl;
|
cout << "(J) - Go To Work (best option btw! don't gamble it's bad)" << endl;
|
||||||
cout << "--------------------" << endl;
|
cout << "--------------------" << endl;
|
||||||
cout << "(M) - Deposit Money" << endl;
|
cout << "(M) - Deposit Money" << endl;
|
||||||
cout << "(W) - Withdraw NyscoCoins" << endl;
|
cout << "(W) - Withdraw NyscoCoins" << endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user