-
Dictionaries are one of the best beneficial guides for our lives.Problem was that we actually do not know whether word is memorized or not.Thanks to Quick Dictionary , the words that are flowing on the screen , do not depend on anything indeed.User cannot know how words come in screen or flowing on it.The only thing known is that words are come out on the screen randomly.
-
There are so many graphical library compatible with C and C++ languages. In this project , I choosed SDL which supply an advanced control over the graphical and IO controlling issues which are effective for the user part of the program.
-
Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.
SDL is written in C, works natively with C++, and there are bindings available for several other languages, including C# and Python.
Official Wepsite : Simple DirectMedia Layer
-
Warning : There is no compiled library in this program.If you want to test it , please follow the steps that are below.
- Download current version of the SDL from here.
- Do not forget that there is one additional library.
- You can just use or customize makefile at yours sweet will.
- You can stop or resume the word-flow by pressing any button on the keyboard.
-
The Mersenne Twister is a pseudorandom number generator (PRNG). It is by far the most widely used general-purpose PRNG. Its name derives from the fact that its period length is chosen to be a Mersenne prime.
- A Mersenne Twister pseudo-random generator of 32-bit numbers with a state size of 19937 bits.
In C++11 , there is a new pseudo-number-generator added as a standart.
int rand( void ) /* This number is generated by an algorithm that returns a sequence of apparently non-related numbers each time it is called. This algorithm uses a seed to generate the series, which should be initialized to some distinctive value using function srand. */
Notice though that modulo operation on this function does not generate uniformly distributed random numbers in the span (since in most cases this operation makes lower numbers slightly more likely).
For those kind of reason , I prefer using
c++ <random>
library for generating enhenced and more pseudo number in my programs.You can check out here for more information.
Generators: Objects that generate uniformly distributed numbers.
Distributions: Objects that transform sequences of numbers generated by a generator into sequences of numbers that follow a specific random variable distribution, such as uniform, Normal or Binomial.
-
There are so many distributions out there and each of them may has a distinct algorithm to create pseudo-number with different return type.There are some example here below.
-
In this project , I needed a returned int type distrobution in the program.That's why I choosed uniform_int_distribution.
-
Also we need a generator as I mentioned.Generators are separated each other in terms of algorithm.There some generator example below.
I prefered using mt19937.