Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolution for #19 #21

Merged
merged 3 commits into from
Feb 16, 2017
Merged

Resolution for #19 #21

merged 3 commits into from
Feb 16, 2017

Conversation

gonzagab
Copy link
Collaborator

MazeIO class was modified so that it intakes a file that has cells that at are two characters wide. The simulation also prints out a maze with cells that are two characters long.

Copy link
Owner

@kbumsik kbumsik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I liked your coding style and it works well too! :) I hope now you understand pointer and IO stuff well!
But there are minor issues:

  1. Update 2.txt too. You don't need to change 2.txt by hand. When you input q in the simulation the program will save the maze to 2.txt and exit.
  2. So, 1.txt is an input maze and 2.txt is an output maze. But I noticed the difference between input and output in your code.

This is your 1.txt:

 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ 
|  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  |
 ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** 
|  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  |
 ** ** ** ** ** ** ** __ ** ** ** ** ** ** ** ** 
|  *  *  *  *  *  *  |  |  *  *  *  *  *  *  *  |
 __ __ __ __ __ __ __ .. ** ** ** ** ** ** ** ** 
|  .  .  .  .  .  .  .  |  *  *  *  *  *  *  *  |
 .. .. __ __ __ __ __ __ __ ** ** ** ** ** ** ** 
|  |  .  .  .  .  .  .  |  |  *  *  *  *  *  *  |
 .. .. __ __ __ __ __ __ .. ** ** ** ** ** ** ** 
|  |  .  .  .  .  .  .  .  |  *  *  *  *  *  *  |
 .. .. __ __ __ __ __ __ .. ** ** ** ** ** ** ** 
|  |  |  *  *  *  *  *  |  |  *  *  *  *  *  *  |
 .. .. ** ** ** ** ** __ .. ** ** ** ** ** ** ** 
|  |  |  *  *  *  *  | G. G|  *  *  *  *  *  *  |
 .. .. ** ** ** __ __ .. .. __ __ __ __ ** ** ** 
|  |  |  *  *  |  .  . G. G|  .  .  .  |  *  *  |
 .. .. __ __ __ .. __ __ __ __ __ __ .. ** ** ** 
|  |  .  .  .  |  .  .  .  .  |  .  |  |  *  *  |
 .. __ __ __ .. .. __ __ __ .. __ __ .. ** ** ** 
|  .  .  .  |  |  |  .  .  |  .  .  .  |  *  *  |
 __ __ __ .. .. .. __ __ __ .. __ __ .. ** ** ** 
|  .  .  .  |  |  .  .  .  .  .  .  |  |  *  *  |
 .. __ __ __ .. __ __ __ __ __ __ __ .. ** ** ** 
|  .  .  .  |  .  .  .  .  .  .  .  .  |  *  *  |
 __ __ __ __ .. __ __ __ __ __ __ __ __ ** ** ** 
|  .  .  .  .  |  *  *  *  *  |  .  |  *  *  *  |
 .. .. __ __ __ ** ** ** ** ** .. .. ** ** ** ** 
|  |  |  *  *  *  *  *  *  *  |  |  |  *  *  *  |
 .. .. __ __ __ __ __ __ __ __ .. __ ** ** ** ** 
| S|  .  .  .  .  .  .  .  .  .  |  *  *  *  *  |
 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ 

And then here is 2.txt:

 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ 
|  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  |
 ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** 
|  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  |
 ** ** ** ** ** ** ** __ ** ** ** ** ** ** ** ** 
|  *  *  *  *  *  *  |  |  *  *  *  *  *  *  *  |
 __ __ __ __ __ __ __ .. ** ** ** ** ** ** ** ** 
|  .  .  .  .  .  .  .  |  *  *  *  *  *  *  *  |
 .. .. __ __ __ __ __ __ __ ** ** ** ** ** ** ** 
|  |  .  .  .  .  .  .  |  |  *  *  *  *  *  *  |
 .. .. __ __ __ __ __ __ .. ** ** ** ** ** ** ** 
|  |  .  .  .  .  .  .  .  |  *  *  *  *  *  *  |
 .. .. __ __ __ __ __ __ .. ** ** ** ** ** ** ** 
|  |  |  *  *  *  *  *  |  |  *  *  *  *  *  *  |
 .. .. ** ** ** ** ** __ .. ** ** ** ** ** ** ** 
|  |  |  *  *  *  *  |  .  |  *  *  *  *  *  *  |
 .. .. ** ** ** __ __ .. .. __ __ __ __ ** ** ** 
|  |  |  *  *  |  .  .  .G |  .  .  .  |  *  *  |
 .. .. __ __ __ .. __ __ __ __ __ __ .. ** ** ** 
|  |  .  .  .  |  .  .  .  .  |  .  |  |  *  *  |
 .. __ __ __ .. .. __ __ __ .. __ __ .. ** ** ** 
|  .  .  .  |  |  |  .  .  |  .  .  .  |  *  *  |
 __ __ __ .. .. .. __ __ __ .. __ __ .. ** ** ** 
|  .  .  .  |  |  .  .  .  .  .  .  |  |  *  *  |
 .. __ __ __ .. __ __ __ __ __ __ __ .. ** ** ** 
|  .  .  .  |  .  .  .  .  .  .  .  .  |  *  *  |
 __ __ __ __ .. __ __ __ __ __ __ __ __ ** ** ** 
|  .  .  .  .  |  *  *  *  *  |  .  |  *  *  *  |
 .. .. __ __ __ ** ** ** ** ** .. .. ** ** ** ** 
|  |  |  *  *  *  *  *  *  *  |  |  |  *  *  *  |
 .. .. __ __ __ __ __ __ __ __ .. __ ** ** ** ** 
|S |  .  .  .  .  .  .  .  .  .  |  *  *  *  *  |
 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ 

Did you see the difference? 1.txt has S and G on the right but 2.txt has them in the left. (Do not care about output only has one G for now.) So please unify them.
It is up to your decision which side will have these characters.

@gonzagab
Copy link
Collaborator Author

Yaa Mr. Bumsik. all done. All letters will be printed right align now in 2.txt and when its printed out tothe console.

Copy link
Owner

@kbumsik kbumsik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good :)

@kbumsik kbumsik merged commit 866c1c2 into kbumsik:master Feb 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants