## Game of Nim

It is an intro to programming C++. The main objective of this course is to familiarize students with the fundamental concepts of programming using C++. Throughout the course, students will learn about variables, data types, control structures, functions, and more. For one of the assignments, students will need to write a C++ assignment program that demonstrates their grasp of the concepts taught in the class. The code should be written in a clear and organized manner, adhering to best practices and the principles of good coding style. This assignment will not only test their programming skills but also encourage them to think critically and creatively to solve real-world problems using C++.

**Sample output 1:
**

Welcome to the game of Nim.

There are 16 marbles in the pile.

Φ Φ Φ Φ Φ Φ Φ Φ Φ Φ Φ Φ Φ Φ Φ Φ

Computer plays:

The computer takes 3 marbles.

There are 13 marbles in the pile.

Φ Φ Φ Φ Φ Φ Φ Φ Φ Φ Φ Φ Φ

Your play .. you may take 1 to 6 marbles. You take: I will move 6 marbles↵

Invalid! Please try again...

Your play .. you may take 1 to 6 marbles. You take: six marbles↵

Invalid! Please try again...

Your play .. you may take 1 to 6 marbles. You take: 6 marbles ok?↵

You will take 6 marbles.

There are 7 marbles in the pile.

Φ Φ Φ Φ Φ Φ Φ

Computer plays:

The computer takes 3 marbles.

There are 4 marbles in the pile.

Φ Φ Φ Φ

Your play .. you may take 1 to 2 marbles. You take: 4↵

Ooops, you picked too many or not enough. Please try again...

Your play .. you may take 1 to 2 marbles.

You take: three↵

Invalid! Please try again...

Your play .. you may take 1 to 2 marbles. You take: 3↵

Ooops, you picked too many or not enough. Please try again...

Your play .. you may take 1 to 2 marbles. You take: 2↵

You will take 2 marbles.

There are 2 marbles in the pile.

Φ Φ

Computer plays:

The computer takes 1 marble.

You must take the last marble. You lose!

**Sample output 2:**

You will play first.

The computer will play smart.

There are 10 marbles in the pile.

Φ Φ Φ Φ Φ Φ Φ Φ Φ Φ

In your play .. you may take 1 to 5 marbles.

You take: 5 marbles and I will see how you move:)↵ You will take 5 marbles.

There are 5 marbles in the pile.

Φ Φ Φ Φ Φ

Computer plays:

The computer takes 2 marbles.

There are 3 marbles in the pile.

Φ Φ Φ

In your play .. you may take 1 to 1 marble. You take: -5↵

Ooops, you picked too many or not enough. Please try again...

In your play .. you may take 1 to 1 marble. You take: 7↵

Ooops, you picked too many or not enough. Please try again...

In your play .. you may take 1 to 1 marble. You take: 1↵

You will take 1 marble.

There are 2 marbles in the pile.

Φ Φ

Computer plays:

The computer takes 1 marble.

You must take the last marble. You lose!

**Sample output 3:**

The computer will play first.

The computer will not play smart.

There are 15 marbles in the pile.

Φ

Φ Φ Φ Φ Φ Φ Φ Φ Φ Φ Φ Φ Φ Φ

Computer plays:

The computer takes 6 marbles.

There are 9 marbles in the pile.

Φ Φ Φ Φ Φ Φ Φ Φ Φ

Your play .. you may take 1 to 4 marbles. You take: three is my choice↵

Invalid! Please try again...

Your play .. you may take 1 to 4 marbles. You take: 3 is my smart choice↵

You will take 3 marbles.

There are 6 marbles in the pile.

Φ Φ Φ Φ Φ Φ

Computer plays:

The computer takes 2 marbles.

There are 4 marbles in the pile.

Φ Φ

Φ Φ

Your play .. you may take 1 to 2 marbles. You take 1 and I am smart:) ↵

You will take 1 marble.

There are 3 marbles in the pile.

Φ Φ Φ

Computer plays:

The computer takes 1 marble.

There are 2 marbles in the pile.

Φ Φ

In your play, you may take 1 to 1 marble. You take: 1 and I will win the game:) ↵ You will take 1 marble.

The computer must take the last marble. You win!

**Solution:**

```
*/
#include < cstdlib>
#include < iostream>
#include < string>
#include < time.h>
using namespace std;
const int PILE_MAX = 50;
const int PILE_MIN = 10;
const char MARBLE = static_cast
```