Release REEILYMods Numbergame

REEILYMods

Modder
Messages
65
Reaction score
37
Points
568
Hello community!
I'm always trying to improve my C++ skills and I'm on a good way!
Today I'm releasing a small numbergame,
that cost me a lot of nerves! :smile:

You do not have permission to view link Log in or register now.

-Me
.A good book for learning C++
( It's german so it's useless to give the name :grinning: )

You do not have permission to view link Log in or register now.

You do not have permission to view link Log in or register now.

Code:
//Sadly I used german declarations for ints, the long long and the bool!

#include <iostream>
#include <ctime>
#include <cstdlib>

using namespace std;

int main()
{
    bool gefunden = false;
    char input = 'w';
    int zahl, versuch, ratezahl;
    long long sek;
    time(&sek);
    srand((unsigned)sek);
    while (input == 'w')
    {
        system("cls");
        cout << "*** A NUMBERGAME ***\n"
            << "Spielregeln:\n"
            << "# 1 I'm going to generate a number between 0 and 15!\n"
            << "# 2 You have 3 tries to guess the number!\n"
            << "And now have fun!"
            << endl;
        zahl = (rand() % 15 + 1);
        versuch = 0;
        while (!gefunden && versuch < 3)
        {
            cin.sync();
            cin.clear();
            cout << ++versuch << ". Try" << endl;
            cin >> ratezahl;
            if (ratezahl < zahl)
                cout << "Your number is too small!" << endl;
            else if (ratezahl > zahl)
                cout << "Your number is too big!" << endl;
            else
                gefunden = true;
        }
        if (!gefunden)
            cout << "I have won! The number was: " << zahl << endl;
        else
            cout << "Nice! You have won and bet the MASTER!" << endl;
        cout << "Would you like to restart? Enter [w] to restart, [q] to quit!"
              << endl;
        do
            cin.get(input);
        while (input != 'w' && input != 'q');
    }

    system("pause");
    return 0;
}
 
S

SeriousHD-

Guest
Hello community!
I'm always trying to improve my C++ skills and I'm on a good way!
Today I'm releasing a small numbergame,
that cost me a lot of nerves! :smile:

You do not have permission to view link Log in or register now.

-Me
.A good book for learning C++
( It's german so it's useless to give the name :grinning: )

You do not have permission to view link Log in or register now.

You do not have permission to view link Log in or register now.

Code:
//Sadly I used german declarations for ints, the long long and the bool!

#include <iostream>
#include <ctime>
#include <cstdlib>

using namespace std;

int main()
{
    bool gefunden = false;
    char input = 'w';
    int zahl, versuch, ratezahl;
    long long sek;
    time(&sek);
    srand((unsigned)sek);
    while (input == 'w')
    {
        system("cls");
        cout << "*** A NUMBERGAME ***\n"
            << "Spielregeln:\n"
            << "# 1 I'm going to generate a number between 0 and 15!\n"
            << "# 2 You have 3 tries to guess the number!\n"
            << "And now have fun!"
            << endl;
        zahl = (rand() % 15 + 1);
        versuch = 0;
        while (!gefunden && versuch < 3)
        {
            cin.sync();
            cin.clear();
            cout << ++versuch << ". Try" << endl;
            cin >> ratezahl;
            if (ratezahl < zahl)
                cout << "Your number is too small!" << endl;
            else if (ratezahl > zahl)
                cout << "Your number is too big!" << endl;
            else
                gefunden = true;
        }
        if (!gefunden)
            cout << "I have won! The number was: " << zahl << endl;
        else
            cout << "Nice! You have won and bet the MASTER!" << endl;
        cout << "Would you like to restart? Enter [w] to restart, [q] to quit!"
              << endl;
        do
            cin.get(input);
        while (input != 'w' && input != 'q');
    }

    system("pause");
    return 0;
}
Alright, before I say this, dont take this as offense - I think learning how to develop things like this is very, very important in the long run and it is great that you are learning - But bro: You dont have to release this type of stuff lol. This is something you maybe send to your friends, or just play with and hold on to, but small things that arent really 'release' worthy. Again, Its good to start small, it helps you learn. But next time you make something small like this, instead of just posting it like its a project, hold on to it - Or better yet, make a full on tutorial for newcomers. Explain what everything is, explain how and why it works; that is release worthy.
 

Harry

Certified Sick ℂunt
Premium Member
Messages
1,263
Reaction score
969
Points
973
Eh. I'll give you credit if you're only just starting C++ :grinning:
 

swoon

Entrepreneur
Premium Member
Messages
490
Reaction score
353
Points
698
It's a good start, just put some dedication in, and studying and you can learn C++. Building applications, and getting hands on activities is always a good place to start. Also books is always nice. The release is good, I just think you should wait a bit till you learn more, then always improve your applications. Stick with it.
 

Harry

Certified Sick ℂunt
Premium Member
Messages
1,263
Reaction score
969
Points
973
It's a good start, just put some dedication in, and studying and you can learn C++. Building applications, and getting hands on activities is always a good place to start. Also books is always nice. The release is good, I just think you should wait a bit till you learn more, then always improve your applications. Stick with it.
Agreed :grinning: Good point :smile:
 

REEILYMods

Modder
Messages
65
Reaction score
37
Points
568
It's a good start, just put some dedication in, and studying and you can learn C++. Building applications, and getting hands on activities is always a good place to start. Also books is always nice. The release is good, I just think you should wait a bit till you learn more, then always improve your applications. Stick with it.
Thank you! Agree with both of you!
 
Top