[CSI] maze lab hints

Mikhail Nesterenko mikhail at cs.kent.edu
Wed Oct 26 16:47:46 EDT 2022


CSI students,

Here are a few hints about the maze navigation lab.

* Function nextMove() is supposed to return
  the next room selected by the user. However, the user might
  opt to quit the game altogether. In this case, nextMove() may
  invoke exit() function used in Lab 7 that exits the whole program
  or return non-existent room making it a quit signal

* switch may operate on character variable. So this switch is legal

  char choice;
  cin >> choice;
  switch (choice){
  case 'u':  // up
       ...
  case 'd':  // down
  ...
  }

Thanks,
-- 
Mikhail


More information about the cs13001 mailing list