Hello world. I am new at programming. I have started programming at C(in Ubuntu) just when I entered univercity last October. It is hard but I like it. But I have a project where I need to make a, basically a game. The game must be played in the terminal. I have 9 days to complete it and send it. I cannot think of anything else. The game has a board(the board must be at the terminal and must be created and filled dynamically as a 2d array)either a square or a rectangular. The dimencions must be between a certain min N*M(maybe a 3*5) and a max N*M(maybe a 10*15). The main hero is a stingy knight(must be shown as $) and doesn't want to lose much money(which also must be shown at the end how much he lost). He fights enemies(must be shown 1,2,3 depending on how many hits they need till death). In the board there must be, also, some obstacles(must be shown as #). The pathes from where the knight can move must be shown as (. a dot). When the knight kills all the enemies the game updates and the board gets bigger by 1 in both dimencions and if one of the dimencions is at max then it changes only the other. The game ends when the player wins the max N*M board. The player must in the start give to the programme the starting N*M dimencions which the game must start from.

The game has three difficulty levels.
Easy: where both the enemies and the obstacles take a 5% of the N*Mof each level

Medium: where obstacles take a 5% and enemies take 10%.

Hard: where enemies and obstacles take 10%.

The obstacles can be in differenr positions but each enemy must be next to at least one other enemy (up, down, left, right and NOT diagonal).This must be done with a rand().

To show the board each line and each column must have above and in the left the number of each line and column.

Now, about the moving.
To move the knight the user must give (U/u, D/d, L/l, R/r)and a number(1-9). For example, U7 d4 L3 r2. If the programme finds out that there is an obstacle or an enemy it asks again for moving. That costs 5.

Punch.
Punch costs 50. To do a punch the user writes (F or f) and removes 1 health point from the enemy next to the knight. After that if behind the enemy there is nothing it moves one position behind. If not enemy doesn't move.

Chop with an axe.
That costs 70. To do that the user must write (A or a). That removes 1 health point from the enemy next to the knight and also the on behind that enemy. If chop is done correctly and hit the enemies they go back one block back if no obstacles or other enemy is behind. Also, if the second enemy dies and the one next to the knight doesn't that enemy goes back where the dead enemy was.

Slash.
That costs 80. To do that the user must write (S or s). That removes 1 health point from the 3 enemies who are in front of the knight(Up,down,left,right).If there is an obstacle or an enemy behind them then they don't go back else they do.

Bow Attack.
That costs 60. To do that the user must write (B or b). That removes 1 health point from an enemy who is one block far from the knight. If there is an obstacle or an enemy behind the enemy does NOT go back else they do.

If the attacks does not hit an enemy then the cost is 0.

To end the game the player must write (X or x).

Also, the knight can move from the one end of the board to the other.

If the player gives different letters the program must ask again.

Here are one example.

1 2 3 4 5 6 7 8 91011
------------------------------
1 | . #. . . 1 3 . # . .
2 | . . . . 2 2 1 . . . .
3 | . . . . . . 3 . . . .
4 | # . . . . . . . . . .
5 | . . . . . . . . . . .
6 | . . . . . . . . . . .
7 | . . . . . . . . . . .
8 | . . . . . $ . . . . .
9 | . . . . . . . . . . .
10| # . . . . . . . . . .
stingy
stingy


Level money spent: 25
Game money spent: 300
Make your move:


Thanks for the help.