Valid XHTML 1.1

Guessing Game and Monte Carlo Pi


Pool Simulation
Prolog Programming
Graphical Techniques
Top Trumps
Guessing Game & Monte Carlo Pi
10 Second Video


Guessing Game and Monte Carlo Pi were projects developed during the first year at University for the Further Programming module. Both projects were developed in Visual Studio for the Windows command console. Guessing Game is a simple number guessing game and Monte Carlo Pi is a program that estimates the value of pi using the Monte Carlo method.

The guessing game had to be designed to choose numbers randomly and statistics needed to be recorded. Along side those main requirements I also implemented time delayed responses for the computer when guessing numbers and I also kept the games instructions visible in the form of a header at the top of the console window. To prevent cheating I added in a check on user inputs to make sure the computer was being given thruthful replies.

The Monte Carlo method for estimating pi involves generating random points in a grid that contains a circle with a radius equal to the grids size. Dividing the number of points inside the circle by those outside gives an estimation of pi. In order to increase efficiency in the calculations I was careful to avoid square roots and unecessary arithmetic. The Monte Carlo Pi program was an additional assessment for extra credit.


You can download the executables in Rar (8 KB) or Zip (8 KB) format.
Guessing Game and Monte Carlo Pi: RAR ZIP