SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

The format of the data files for gtraffic is very simple. The general structure of one of the datafiles is as follows.

[SkillLevel]
Card1=string describing card 1
Card2=string describing card 2
...

The strings used to describe the cards begins with two numbers describing the level (minimum number of moves possible and number of cars that must be removed) this is followed by a space separated list defining the cars on the grid. So the string looks as follows

cars_for_goal,minmoves xpos,ypos,orientation,for_goal,length,color ...

xpos and ypos are numbers between 0 and 5 that specify the cars position on the grid

orientation is either a zero or a one where a zero means that the car moves vertically and a one means the car moves horizontally

for_goal is either a zero or a one where a one specifies that this car is part of the goal and will be allowed to escape the grid through the slot

length is the number of grid units, typically two or three

color is a string that says what color to draw that card as which is usually a string like red, but it can handle anything that XParseColor(3X11) can handle


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.