Skip to main content
edited body
Source Link
Toby Speight
  • 81.8k
  • 14
  • 101
  • 309

In addition to everything mentioned in Toby Speight's review:

This program can use at least one additional class and probably more. The class that is obviously missing is Game. The class Game should be responsible for loading the game from a file, saving the game to a file and executing the game.

The function createOriginalSave() should probably be broken up into createNewGame() and then use the save() function to save the new game.

The suggested createNewGame() function should generate a map of rooms.

Each room should be responsible for printing it'sits data to the output file.

Most of the functions in the file that contain's main are toocontains complexmain are too 'complex' and need to be broken up into smaller functions. You might find some reusable code this way. The code is currently very difficult to maintain and expand because it is so complex.

In addition to everything mentioned in Toby Speight's review:

This program can use at least one additional class and probably more. The class that is obviously missing is Game. The class Game should be responsible for loading the game from a file, saving the game to a file and executing the game.

The function createOriginalSave() should probably be broken up into createNewGame() and then use the save() function to save the new game.

The suggested createNewGame() function should generate a map of rooms.

Each room should be responsible for printing it's data to the output file.

Most of the functions in the file that contain's main are too complex and need to be broken up into smaller functions. You might find some reusable code this way. The code is currently very difficult to maintain and expand because it is so complex.

In addition to everything mentioned in Toby Speight's review:

This program can use at least one additional class and probably more. The class that is obviously missing is Game. The class Game should be responsible for loading the game from a file, saving the game to a file and executing the game.

The function createOriginalSave() should probably be broken up into createNewGame() and then use the save() function to save the new game.

The suggested createNewGame() function should generate a map of rooms.

Each room should be responsible for printing its data to the output file.

Most of the functions in the file that contains main are too 'complex' and need to be broken up into smaller functions. You might find some reusable code this way. The code is currently very difficult to maintain and expand because it is so complex.

Source Link
pacmaninbw
  • 24.9k
  • 11
  • 46
  • 109

In addition to everything mentioned in Toby Speight's review:

This program can use at least one additional class and probably more. The class that is obviously missing is Game. The class Game should be responsible for loading the game from a file, saving the game to a file and executing the game.

The function createOriginalSave() should probably be broken up into createNewGame() and then use the save() function to save the new game.

The suggested createNewGame() function should generate a map of rooms.

Each room should be responsible for printing it's data to the output file.

Most of the functions in the file that contain's main are too complex and need to be broken up into smaller functions. You might find some reusable code this way. The code is currently very difficult to maintain and expand because it is so complex.