JoeyHinckley34 / Bomb-Field

Game I created using c++.
0 stars 0 forks source link

feedback #1

Open Domosed-gamin opened 4 years ago

Domosed-gamin commented 4 years ago

I understand nothing. How play this puzzle? I not can to beat even first level. This is sudoku, minesweeper clone or what is?

Domosed-gamin commented 4 years ago

Also I had error.

ringo@qwerty:~/Загрузки/Bomb-Field-master$ g++ main.cpp -o bomb -Wall
main.cpp: In function ‘void printboard(std::vector<std::vector<int> >, std::vector<std::vector<bool> >, std::vector<std::pair<int, int> >, std::vector<std::pair<int, int> >, int, int)’:
main.cpp:124:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int x = 0; x < board.size(); x++ ){
                    ~~^~~~~~~~~~~~~~
main.cpp:125:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int y = 0; y < board.size(); y++ ){
                        ~~^~~~~~~~~~~~~~
main.cpp:156:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int x = 1; x < board.size(); x++ ){
                    ~~^~~~~~~~~~~~~~
main.cpp:166:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int x = 1; x < board.size(); x++ ){
                    ~~^~~~~~~~~~~~~~
main.cpp: In function ‘void printanswer(std::vector<std::vector<int> >, std::vector<std::pair<int, int> >, std::vector<std::pair<int, int> >, bool, int)’:
main.cpp:181:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int x = 0; x < board.size(); x++ ){
                    ~~^~~~~~~~~~~~~~
main.cpp:182:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int y = 0; y < board.size(); y++ ){
                        ~~^~~~~~~~~~~~~~
main.cpp:206:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int x = 1; x < board.size(); x++ ){
                    ~~^~~~~~~~~~~~~~
main.cpp:215:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int x = 1; x < board.size(); x++ ){
                    ~~^~~~~~~~~~~~~~
main.cpp: In function ‘std::vector<std::pair<int, int> > getrows(std::vector<std::vector<int> >)’:
main.cpp:236:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      for(int x = 0; x < b.size(); x++ ){
                     ~~^~~~~~~~~~
main.cpp:240:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          for(int y = 0; y < b[x].size(); y++ ){
                         ~~^~~~~~~~~~~~~
main.cpp: In function ‘std::vector<std::pair<int, int> > getcols(std::vector<std::vector<int> >)’:
main.cpp:258:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      for(int x = 0; x < b.size(); x++ ){
                     ~~^~~~~~~~~~
main.cpp:262:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          for(int y = 0; y < b[x].size(); y++ ){
                         ~~^~~~~~~~~~~~~
main.cpp: In function ‘bool boardlose(std::vector<std::vector<int> >, std::vector<std::vector<bool> >)’:
main.cpp:277:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int x = 0; x < board.size(); x++ ){
                    ~~^~~~~~~~~~~~~~
main.cpp:278:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int y = 0; y < board.size(); y++ ){
                        ~~^~~~~~~~~~~~~~
main.cpp: In function ‘bool boardwin(std::vector<std::vector<int> >, std::vector<std::vector<bool> >)’:
main.cpp:289:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int x = 0; x < board.size(); x++ ){
                    ~~^~~~~~~~~~~~~~
main.cpp:290:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int y = 0; y < board.size(); y++ ){
                        ~~^~~~~~~~~~~~~~
main.cpp: In function ‘bool updateleaderboard(const string&, std::__cxx11::string, int, std::vector<std::pair<std::__cxx11::basic_string<char>, int> >&)’:
main.cpp:350:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int x = 0; x < leaderboard.size(); x++){
                    ~~^~~~~~~~~~~~~~~~~~~~
main.cpp:368:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int x = 0; x < leaderboard.size(); x++){
                    ~~^~~~~~~~~~~~~~~~~~~~
main.cpp: In function ‘int main(int, char**)’:
main.cpp:449:67: error: ‘sort’ was not declared in this scope
             sort(leaderboard.begin(), leaderboard.end(), sortByVal);
                                                                   ^
main.cpp:453:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for(int x = 0; x < leaderboard.size(); x++){
                                ~~^~~~~~~~~~~~~~~~~~~~
main.cpp:459:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for(int x  = 0; x < board.size(); x++ ){
                             ~~^~~~~~~~~~~~~~
main.cpp:475:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for(int x  = 0; x< board.size(); x++ ){
                             ~^~~~~~~~~~~~~~

I fixed it when I added string #include <algorithm> in source file.