SOURCE CODE: https://bitbucket.org/andresjesse/game_cpp_doc
Packages for Ubuntu: sudo apt-get -y install build-essential xserver-xorg-dev x11proto-xf86vidmode-dev libxxf86vm-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libxext-dev libxcursor-dev
clean stuff:
$ make clean
build library, this will generate lib/libseiousgame.so, that contains the base framework to students develop their tasks:
$ make lib
build documentation (requires doxygen, dot and graphviz):
$ make doc
build distribution to students (does not contains solutions and source code):
$ make dist
build application (this command can be used by teacher or students):
$ make
Programming Content: - conditionals (if-else) - loops (for, while, do-while) - vectors (c-array) - matrices (c-matrix)
Definition: the door only can be opened by inserting the correct password;
Header: bool verify_password(int password);
Expected result: must return true if password is 1234, false otherwise
Definition: Each user has his own username and password, the door opens only for allowed users; The lab can handle with 5 users/passwords.
Header: bool verify_password_lab(string user, string password);
Expected result: user enters username and password, the function must return true if data match with the stored passwords, false otherwise.
The stored passwords are: user1: volvo user2: chevrolet user3: audi user4: bmw user5: lada
Definition: Some users are not happy with their passwords, for some reason they want to encrypt it. Write a code to help this task following this encrypt rule:
Header: string encrypt(string old_password);
Sample:
old_password = "abcl" expected return: "bcdm"
Definition: The laboratory X is a very restrict area. Researchers have free access by using fingerprint, but sometimes is needed to allow some other people to enter. This people cannot have lifetime access, instead their have a short time way to get in. This short time access is controlled by a number sequence that is generated by the computer.
Your task here is to generate valid number sequences, follow the rules:
Header: int* generateSequence(int n);
Samples:
n=3 [6,9,12,15] n=17 [34,51,68,85]
Definition: The last laboratory is the most restrict are in the scene, so it requires a very hard code to allow access. This code is hidden inside a character matrix of size 8x8. The matrix is composed by non-empty characters, there's only one 'x' in there. You need to locate this special character ('x'), after that, you need to count and return how many 'w' are around it (in a max distance of 1 unit). You just need to count the characters and return, Your mechanishm will be used to validate the cards.
Samples:
######## #adfwhj# #jshuaw# #jawhhl# #oxihal# #uhwgta# #qrakkw# ########
jaw oxi uhw
Header: int countCharacters(char matrix[8][8]);