PF Fall 2021 – Project Submission Instructions: 1) This project will be done in groups of three. 2) Add all .cpp and .txt files in one folder. Name your folder by including your Group # and roll numbers (e.g. group1_21L-1234_21L-1234_21L-1234) and then zip the folder, and submit it. No need to add section name or anything else in the name of the folder. 3) And kindly note that write your roll no. in the format given above and not as L21-XXXX or 21-XXXX because it makes it hard to find the submission of specific student. 4) There is straight 20 Percent deduction of marks for groups who submit more than 1 folders. 5) If any group resubmits, make sure they remove the folder they last submitted from drive, by clicking the cross that shows when you have attached a file at Submission folder.

PF Fall 2021 – Project

 

Submission Instructions:

1) This project will be done in groups of three.

2) Add all .cpp and .txt files in one folder. Name your folder by including your Group # and roll numbers (e.g. group1_21L-1234_21L-1234_21L-1234) and then zip the folder, and submit it. No need to add section name or anything else in the name of the folder.

3) And kindly note that write your roll no. in the format given above and not as L21-XXXX or 21-XXXX because it makes it hard to find the submission of specific student.

4) There is straight 20 Percent deduction of marks for groups who submit more than 1 folders.

5) If any group resubmits, make sure they remove the folder they last submitted from drive, by clicking the cross that shows when you have attached a file at Submission folder.

6) You have to upload your projects in google classroom. Don’t forget to turn in after uploading your project.

7) Plagiarism tool will be used to check if you have cheated off of internet or any other source. If someone’s project is plagiarized, that student will be given F straight away.

8) You can email me (aamina.batool@lhr.nu.edu.pk) or your TA Ehsan (l191242@lhr.nu.edu.pk), if you have any query.

9) The submission deadline is November 30, 2021, 11:59 pm. No late submission will be accepted.

 

 

 

 

 

 

 

 

 

1024

You will implement a single player game “1024” in C++.

Step1:

At start of the game, a 2D grid of 4 x 4 cells will appear, with any two cells initialized to 1 or 2 and the rest of the cells will be empty.

 

Sample grid 1: Sample grid 2:

 

 

Now, the player has 4 options:

1) Swipe left (letter key l)

2) Swipe right (letter key r)

3) Swipe up (letter key u)

4) Swipe down (letter key d)

Step 2:

In the sample grid 1 if the player moves towards left, all the cells will be shifted towards left and a random new cell will be initialized with 1 or 2 as shown in the figure below:

Similarly, in the sample grid 2, if the player moves downwards, all the cells will be shifted downwards and a random new cell will be initialized with 1 or 2 as shown in the figure below:

 

Step 3:

Now in sample grid 2, if the player moves towards right, all values will move towards right and similar values will be combined and replaced by their sum, and a random new cell will be initialized with 1 or 2 as shown below:

The game can end in either of the following two scenarios:

1) The value of one of the cells becomes 1024, in which case the player wins, as shown in the figure below:

 

 

2) The whole grid is filled with numbers and no two adjacent cells have same value, in which case the player loses, as shown in the figure below:

 

 

Task:

Your task is to implement this single player game. Keep in mind that after every move, the screen must be cleared and new grid will be printed. You can implement this project with or without graphics.

 

Evaluation:

Your logic will be evaluated via your code and a viva. If code is plagiarized, the whole group will be awarded F grade. Each member should do his/her own share of work in the project otherwise he/she will be singled out during viva and will not be given same marks as the other group members.

 

You can play this game here to get a better understanding:

https://1024game.org/

GET HELP WITH YOUR HOMEWORK PAPERS @ 25% OFF

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

Write My Paper Button

WeCreativez WhatsApp Support
We are here to answer your questions. Ask us anything!
👋 Hi, how can I help?
Scroll to Top