- Read chapters 01-02 of CPPQT Roadmap Book: https://pllug.gitlab.io/cppqt/cppqt-roadmap-book
- Installed MSYS2_Commander: https://github.com/PLLUG/CPPQT-MSYS2-Cmder/releases/download/2019-11/MSYS2_Commander-2019-11.7z
- In MSYS2_Commander
install-dev-env
andinstall-qt5-env
commands are done.
- Run QtCreator.
- Clone repository, add maze sources, create and open project for maze sources, compile and run.
- Install
mingw-w64-x86_64-pdcurses
library. - Link
pdcurses
library, link aditional libraries for practice (libs\libmazify.a
,libs\libcurses-helper-utils
). - Draw map using
pdcurses
lib. - Forming teams, assigning tasks.
- clone git repo
- create branch
random-walls-generation
using commandgit checkout -b random-walls-generation
- use ready part from homework or use
void mazify(std::array<std::array<char, mazeColumns>, mazeRows> &maze, int x1, int x2, int y1, int y2);
wheremaze
is reference to game field where walls should be generated,x1
andx2
minimum and maximum row,y1
andy2
minimum and maximum column used to place maze walls in between. - include
mazify.h
header to usemazify()
function, if needed - place call to function that generate random walls in appropriate place
- commit your changes to git
- push your branch to remote using
git push -u origin random-walls-generation
- clone git repo
- create branch
key-to-exit
using commandgit checkout -b key-to-exit
- add call to
placeCharRandomly()
function fromrandom-utils.h
to place a key on a map - create variable that indicate that key was found by player
- make exit end the game only if key was found, otherwise exit should behave like a wall
- commit your changes to git
- push your branch to remote using
git push -u origin key-to-exit
- clone git repo
- create branch
map-decoration
using commandgit checkout -b map-decoration
- Define new colorful symbol by printing
symbol | COLOR_PAIR(color)
for each value on the game map, for exampleACS_DIAMOND | COLOR_PAIR(7)
. Use following table (where symbol should not be changed-
is placed)
value | symbol | color |
---|---|---|
empty | - | 1 |
wall | ACS_BLOCK |
8 |
character | - | 3 |
exit | ACS_PI |
6 |
key | - | 4 |
score1 | ACS_DIAMOND |
5 |
score2 | ACS_DIAMOND |
7 |
score3 | ACS_DIAMOND |
8 |
- commit your changes to git
- push your branch to remote using
git push -u origin map-decoration
- clone git repo
- create branch
game-scores
using commandgit checkout -b game-scores
- create variable that will store scores
- add call to
placeCharRandomly()
function fromrandom-utils.h
to place scores on a map. Count of score items: score1 - 25 items on a map, score2 - 10 items on a map, score3 - 3 items on a map - decrease scores value by 1, on each character move
- increase scores value when character takes score item: score1 +10, score2 +25, score3 +50
- commit your changes to git
- push your branch to remote using
git push -u origin game-scores
- clone git repo
- create branch
game-info
using commandgit checkout -b game-info
- create a function that prints scores value and status for key, use function
printStringToTerminalWindow()
fromcurses-helper-utils.h
, use color as a third parameterCOLOR_PAIR(33)
for label,COLOR_PAIR(39)
for value - to convert scores from integer to string, use std::to_string() function that takes integer as a parameter and returns string
- display
YES
orNO
for key status - commit your changes to git
- push your branch to remote using
git push -u origin game-info
- clone git repo
- create branch
game-messages
using commandgit checkout -b game-messages
- create a function that prints information about controls, use function
printStringToTerminalWindow()
fromcurses-helper-utils.h
, use color as a third parameterCOLOR_PAIR(57)
for key,COLOR_PAIR(16)
for description - use following information: L LEFT, R RIGHT, U UP, D DOWN
- print message
CONGRATULATIONS! YOU WIN!
in the center of the screen, after user wins the game, useCOLOR_PAIR(39)
for color. Message should be displayed and game should not exit until user press a key. - commit your changes to git
- push your branch to remote using
git push -u origin game-messages
- Discussing each implementation, merging changes
- Discussion of workshop, what goes well and what is not