1
ITC Project Spring 2016
Motivation:
Well as you all know Computing is the foundation of modern society. A proficient
computing workforce is essential for maintaining the countrys leadership and
competitiveness in the global economy. As, Obama has also put out his believe
for CS in 'Computer Science for all' in which he has promised 4 billion dollars for
CS in America. But, obviously you guys are not as interested as we are; about
your distant future rather you prefer being lazy and whining about everything in
your life. But not to worry! We are here and so is your project.
This project is to be done by every student individually.
(Means
not a group project)
Project Statement:
The class project that you are going to implement is a board game that follows
some basic and very simple rules. Let's call this game "Four Up". In the game
the players will first choose a symbol and then take turns dropping the selected
symbols from the top into a seven-column, six-row grid. The pieces fall straight
down, occupying the next available space within the column.
The objective of the game is to connect four of players' symbol next to each
other vertically, horizontally, or diagonally before your opponent. The game can
only have 3 states as outcome.
Win
Lose
Draw
Now the way you are going place each symbol down the column is by pressing
the keys 1 to 7. This will make the particular symbol of the player taking the turn
fall until it has either hit the bottom or any of the two symbols. As shown in
image 1.
Image 1
Now this is only a sample image. But, you can decide on your own about what
characters to use for making grid or symbols for the 2 players.
The winning outputs in case of player 1 with symbol
follows:
horizontally
vertically
Diagonally
or
inside the grid can be as
Scoring criteria:
The scores for each player will be updated as soon he makes a pattern
(mentioned above). The player with the maximum pattern score will win.
There will be 2 parts of this project: part 1 will be slightly student friendly and
part 2 will be teacher friendly. How? Read below.
Part 1: You will implement the game for two human players to play. We will
manually decide which column to throw the symbol in.
Part 2: You will implement the game for human vs. computer. This means that
in one turn we will decide in which column to thrown the symbol. For the other
turn your program will decide which column to throw the symbol in so that the
human player does not win.
If you want to play the game you are going to
implement: check the following link:
[Link]
Implementation details:
To implement this game you need do the following:
1. Make menu for your game and allow the users to select their symbols
2. Make a grid of the size of console. (This may be dynamic for part 2)
3. Game will continue until the whole grid has no more empty box. Until then
the player will keep on taking turns respectively.
4. Implement a function that takes in consideration about the status of game
and updates the score for each player accordingly.
5. You will also have to write a function that calculates the score for each
player.
6. You will also have to write a program that can play with a single human
player in the absence of the other (part 2). This function must try its best
to win against the player.
7. Last but the not least make sure you use functional programming as much
as you can. A code thats written all in main will get less marks.
These are the basic guidelines for the project; you are free to implement the
project as per your logic; but by staying in the domain of concepts taught during
this semester.
General coding details:
Code should be properly commented
Use proper terminologies for your variables/arrays declaration. And follow
the proper notations for formatting the variable like: camelCase
myCounter, PascalCaseMyCounter, or underscoresmy_counter.
4
You are the sole owner and care taker of your code; so make sure you
have 2 or 3 backup location where you have saved your most recent work.
Because over the years I have found that PC's get stolen, broken and even
things in them burn write before submissions. Make sure this does not
happen.
Emails will not be accepted in any case what so ever. Its a big NO - NO!
Submissions
Part 1: - (9-April-2016)
Part 2:- (19-April-2016)
You will upload only the .cpp file. With the following format
M_Shahroz_Nadeem_i10-0078_B_Phase_1.cpp. Another format of
submission will have consequences. (Zip files are a big NO-NO
Sir Nouman)