Its y value, and moving right from a cell increases its x With this coordinate system, moving down from a cell increases The upper-left corner, and (15,15) is the lower-right corner. For example, in a maze of size 16, (0,0) is Mazes are square, so the size indicates both the length and the width.Ĭoordinates start in the upper left-hand corner of the maze and (x,y) coordinates for the start and end points. These fields indicate (respectively) the size of the maze and the The first line in the file is the maze header. The maze data files have a relatively simple structure. To write a parser for files in a different format. In the last part of the project you will have Next, which we refer to as the simple maze data file format. Mazes are defined in text files according to a format we describe (Your OS may prevent you from seeing this file Test inputs (sample maze data files, in simple and standard format).With Ruby's built-in data structures and text processing capabilities. The goal of this project is to allow you to familiarize yourself Program that processes text files containing maze data, and you willĪnalyze that data to determine certain features of each maze. Cells should be printed in (x,y) format, not (y,x) format.Īs we saw in lecture, Ruby provides rich support for tasks that 6: Part 1 sortceslls example output was incorrect. CMSC 330, Fall 2015 Organization of Programming Languages Project 1 - Maze Solver Due Monday, 11:59pm
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |