Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdlib.h>
- #include <unistd.h>
- #include <time.h>
- using namespace std;
- int Aiming() {
- if (rand() % 67 < 10)
- return 11;
- else
- return rand() % 10 + 1;
- }
- int main() {
- srand(time(NULL));
- char enter;
- int Hunter = true;
- int HunterSkill = 9;
- int HuntedDuck = 1;
- string HunterName = "";
- int DuckCount = 0;
- int DuckKilled = 0;
- cout << "Welcome to Bird Hunting Season!." << endl << "Do you already have a license to hunt for this season? \nPress [ ENTER ] if you do!.";
- cin.get();
- cout << "Please enter your name: ";
- cin >> HunterName;
- cout << "How Many Ducks you wanna Hunt? ";
- cin >> DuckCount;
- cout << "Get ready to Hunt!" << HunterName << "!" << endl;
- while (Hunter && DuckKilled < DuckCount) {
- int Duck = Aiming();
- if (Duck > 10) {
- cout << endl << "Here comes a pack of DUCKS!" << endl;
- }
- else {
- cout << endl << "You better AIM that Duck! " << DuckKilled + 1 << endl;
- }
- cout << "Aiming... \nBe Careful! Not only ducks are flying around!" << endl;
- sleep(2);
- if (HunterSkill < Duck) {
- Hunter = false;
- cout << "Oh! SHOOT! You've' missed the target and nearly shot the other bird! it might be an ENDANGERED ONE!'." << endl;
- }
- else {
- if (HunterSkill - Duck > 7) {
- cout << "Impressive!" << endl;
- HuntedDuck = HuntedDuck * 2;
- }
- else if (HunterSkill - Duck > 5) {
- cout << "Nice SHOT!" << endl;
- HuntedDuck = HuntedDuck * 2;
- }
- else if (HunterSkill - Duck > 0) {
- cout << "That was a good AIM!" << endl;
- HuntedDuck = HuntedDuck * 2;
- }
- else {
- cout << "You killed a DUCK but you need to focus on our target, You might hurt or killed other Bird!." << endl;
- }
- DuckKilled++;
- }
- cout << endl;
- sleep(1);
- }
- if (DuckKilled == DuckCount) {
- cout << "Congratulation!" << endl;
- }
- else {
- cout << "Sorry, But we need to Stop. Your Aiming is not that Good you might HURT other Animal!. \nComeback Again Next Time and Practice Your AIMING SKILL!" << endl;
- }
- cout << "Duck killed: " << DuckKilled << endl;
- cout << "Final score: " << HuntedDuck << endl << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement