Skip to content

Map formatting #2 #2

@kras2v

Description

@kras2v
  • Your program must take as a first argument a scene description file with the .cub extension.

  • The map must be composed of only 6 possible characters: 0 for an empty space,
    -1 for a wall, and N,S,E or W for the player’s start position and spawning
    orientation.

    This is a simple valid map:
    111111
    100101
    101001
    1100N1
    111111
    
  • The map must be closed/surrounded by walls, if not the program must return
    an error.

  • Except for the map content, each type of element can be separated by one or
    more empty lines.

  • Except for the map content which always has to be the last, each type
    of element can be set in any order in the file.

  • Except for the map, each type of information from an element can be separated
    by one or more spaces.

  • The map must be parsed as it looks in the file. Spaces are a valid part of the
    map and are up to you to handle. You must be able to parse any kind of map,
    as long as it respects the rules of the map.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions