Skip to content

DKolibar/KWG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

KWG - KAREL WORLD GENERATOR

I created this program as coding "exercise". Program generates Karel world from text structure inside of input file.

badge badge badge


badge GitHub All Releases


TUTORIAL:

- Running:

On UNIX run with:

./kwg path_to_map_text_file beepers_amount_at_start

On Windows run THROUGH COMMAND LINE with:

KWG path_to_map_text_file beepers_amount_at_start

- Preparing map for generator:

  • To get valid result from generator you have to prepare VALID input file. But don't worry it is actually very easy process.

  • You just have to copy the map from Karel output to your favourite editor (Notepad, Vim) and ignore first two lines with coordinates etc.

Example with Vim:copy

Tip for Vim: When pasting to Vim you should toggle :set paste! first. Otherwise Vim will do indentation to the pasted text.

  • Make sure you remove all empty lines (your input file ends with "...AVE.")

  • Type of file (.txt, ...) is not important. The file is passed to program as parameter.

  • After sucessfull execution program will prints out "Done." and generate <input_file>.kw in directory.

  • Note: If there is map with amount of placed beepers over 99, generator won't work! Yet...

Flags:

   -D      Show debug info

By Daniel Kolibár | [email protected]

Karel the Robot: GIT | Created by [email protected] (c)2010, 2016