You are on page 1of 2

Basics of Programming BS(SE) Section A 1st Semester Project (Phase 1) – At Max two students are allowed in a group

Submission Date: 20th December 2013 till 11:55pm Instructions: The project consists of three phases. Each phase will have a deadline. If you miss a deadline of a particular phase you will not be awarded any credit in that phase. Each next phase will be dependent on the previous phase, so you must start working on the project from day-1. You are required to work in Visual C++ 6.0 only. A group of maximum size two is allowed, this time make groups of your own choice. User Interface is important in this project. Try to develop an attractive user interface. Use of extra features in the project is encouraged. Use good programming practices (well commented and indented code; meaningful variable names, readable code etc.). Copy/cheating case will be awarded an “0” grade in the course. Email your .cpp file with your groupname and your name should be commented inside start file In this phase, you are required to specify the game area. The game area is a rectangular grid. You are required to draw the game area and a Robot inside this area. The rectangular grid is represented by a two dimensional array of size 24x79 (the console screen is 24x79. To draw the Grid and Robot you can use special characters (see ASCII table). Your screen must look like: Marks: 5


Your Robot should not cross the boundary of your game. On pressing „A‟ or left arrow key. Changing Font Color and Background Color in Visual C++ You need to include following header file #include <windows. the new location of head will be (4. Each digit can be any of the following values: Sets the default console foreground and background colors. Your Robot is the combination of different characters. you are required to move Robot only. This will make white background and black font color. For example. Examples Use following function system(“color 70”) 7 is white 0 is black. you will clear the screen first and then you will draw the whole grid and Robot again on new location. the robot should move left and on pressing „D‟ or right arrow key the robot must move rightwards. 5) on one step forward. if head of the Robot is at co-ordinates (4. system("COLOR fc") produces light red on bright white How to Clear screen in VC++ #include <windows. Each time the robot is supposed to take a movement.For this phase.h> Use this function system (“cls”) 2 . 6) and same goes for the rest of all Robot components.the first corresponds to the background. the second the foreground.h> There are 16 colors available each given a number. Make Proper boundary checks. 0 = Black 8 = Gray 1 = Blue 9 = Light Blue 2 = Green A = Light Green 3 = Aqua B = Light Aqua 4 = Red C = Light Red 5 = Purple D = Light Purple 6 = Yellow E = Light Yellow 7 = White F = Bright White Color attributes are specified by TWO hex digits -.