| 1 | /*************************************************************************** |
| 2 | level.h - description |
| 3 | ------------------- |
| 4 | begin : Fri Dec 8 2000 |
| 5 | copyright : (C) 2000 by Waldemar Baraldi |
| 6 | email : [email protected] |
| 7 | ***************************************************************************/ |
| 8 | |
| 9 | /*************************************************************************** |
| 10 | * * |
| 11 | * This program is free software; you can redistribute it and/or modify * |
| 12 | * it under the terms of the GNU General Public License as published by * |
| 13 | * the Free Software Foundation; either version 2 of the License, or * |
| 14 | * (at your option) any later version. * |
| 15 | * * |
| 16 | ***************************************************************************/ |
| 17 | |
| 18 | #ifndef LEVEL_H |
| 19 | #define LEVEL_Hcxx . . $ `src/level.h:19:9`! |
| 20 | |
| 21 | #include "object.h"cxx . . $ `<file>/src/object.h`/ |
| 22 | #include "str.h"cxx . . $ `<file>/src/str.h`/ |
| 23 | #include "entry.h"cxx . . $ `<file>/src/entry.h`/ |
| 24 | #include "exit.h"cxx . . $ `<file>/src/exit.h`/ |
| 25 | #include "list.h"cxx . . $ `<file>/src/list.h`/ |
| 26 | #include "board.h"cxx . . $ `<file>/src/board.h`/ |
| 27 | |
| 28 | class Levelcxx . . $ Level#: public Objectcxx . . $ Object#{ |
| 29 | public: |
| 30 | |
| 31 | /** Constructor default.*/ |
| 32 | Levelcxx . . $ Level#Level(49f6e7a06ebc5aa8).(); |
| 33 | |
| 34 | /** Destructor*/ |
| 35 | ~cxx . . $ Level#`~Level`(ced63f7c635d850d).Levelcxx . . $ Level#(); |
| 36 | |
| 37 | /** Returns the entry*/ |
| 38 | Entrycxx . . $ Entry# * getEntrycxx . . $ Level#getEntry(6f84fd31fb8f35e8).(int& row, int& column); |
| 39 | |
| 40 | /** Returns the exit*/ |
| 41 | Exitcxx . . $ Exit# * getExitcxx . . $ Level#getExit(f9de70e175261585).(int& row, int& column); |
| 42 | |
| 43 | /** Returns the probability coeficient of fixed pipes*/ |
| 44 | int getFixedCoefcxx . . $ Level#getFixedCoef(b126dc7c1de90089).(); |
| 45 | |
| 46 | /** Returns the probability coeficient of restricted pipes*/ |
| 47 | int getRestrictionCoefcxx . . $ Level#getRestrictionCoef(b126dc7c1de90089).(); |
| 48 | |
| 49 | /** Returns the time to wait until start*/ |
| 50 | int getStartDelaycxx . . $ Level#getStartDelay(b126dc7c1de90089).(); |
| 51 | |
| 52 | /** Returns the speed*/ |
| 53 | int getSpeedcxx . . $ Level#getSpeed(b126dc7c1de90089).(); |
| 54 | |
| 55 | /** Returns the number of required pipes.*/ |
| 56 | int getRequiredcxx . . $ Level#getRequired(b126dc7c1de90089).(); |
| 57 | |
| 58 | /** Returns a list with the graph directories*/ |
| 59 | Listcxx . . $ List# * getGraphDirscxx . . $ Level#getGraphDirs(b69dd7b310d25445).(); |
| 60 | |
| 61 | /** Returns the first pipe index*/ |
| 62 | int getPipeIndexcxx . . $ Level#getPipeIndex(b126dc7c1de90089).(); |
| 63 | |
| 64 | /** Returns the background type*/ |
| 65 | BackgroundTypecxx . . $ BackgroundType# getBackgroundTypecxx . . $ Level#getBackgroundType(7f3a95f138b0791a).(); |
| 66 | |
| 67 | /** Returns the next pipe, NULL if it does not exist*/ |
| 68 | Pipecxx . . $ Pipe# * getPipecxx . . $ Level#getPipe(a0feff3fa5f912a7).(int& i, int& row, int& column); |
| 69 | |
| 70 | /** Carga el nivel en el board.*/ |
| 71 | int loadcxx . . $ Level#load(bc877168d52585ba).(Strcxx . . $ Str# * filename); |
| 72 | |
| 73 | protected: |
| 74 | |
| 75 | enum PipeTypecxx . . $ Level#PipeType# {ElbowNWcxx . . $ Level#ElbowNW., ElbowNEcxx . . $ Level#ElbowNE., ElbowSWcxx . . $ Level#ElbowSW., ElbowSEcxx . . $ Level#ElbowSE., |
| 76 | BowlHcxx . . $ Level#BowlH., BowlVcxx . . $ Level#BowlV., Vertcxx . . $ Level#Vert., Horizcxx . . $ Level#Horiz., CrossPipecxx . . $ Level#CrossPipe.}; |
| 77 | |
| 78 | int numberAssignmentcxx . . $ Level#numberAssignment(b126dc7c1de90089).(); |
| 79 | Strcxx . . $ Str# * stringAssignmentcxx . . $ Level#stringAssignment(cd0a777ac117067e).(); |
| 80 | CardinalPointcxx . . $ CardinalPoint# sideAssignmentcxx . . $ Level#sideAssignment(905e052be7afec52).(); |
| 81 | PipeTypecxx . . $ Level#PipeType# pipeTypeAssignmentcxx . . $ Level#pipeTypeAssignment(5ee071e7498de244).(); |
| 82 | Bonuscxx . . $ Bonus# bonusAssignmentcxx . . $ Level#bonusAssignment(e13c81a6292c3f1e).(); |
| 83 | bool boolAssignmentcxx . . $ Level#boolAssignment(c9857a73d68e59ba).(); |
| 84 | BackgroundTypecxx . . $ BackgroundType# backgroundAssignmentcxx . . $ Level#backgroundAssignment(7f3a95f138b0791a).(); |
| 85 | |
| 86 | void eecxx . . $ Level#ee(49f6e7a06ebc5aa8).(); |
| 87 | void pipecxx . . $ Level#pipe(49f6e7a06ebc5aa8).(); |
| 88 | void levelcxx . . $ Level#level(49f6e7a06ebc5aa8).(); |
| 89 | void printErrorcxx . . $ Level#printError(954ae62f9fac4410).(Strcxx . . $ Str# * s); |
| 90 | |
| 91 | int tokencxx . . $ Level#token.; |
| 92 | int level_numbercxx . . $ Level#level_number.; |
| 93 | |
| 94 | bool errorcxx . . $ Level#error.; |
| 95 | int error_linecxx . . $ Level#error_line.; |
| 96 | |
| 97 | bool entry_readycxx . . $ Level#entry_ready.; |
| 98 | bool exit_readycxx . . $ Level#exit_ready.; |
| 99 | |
| 100 | int start_delaycxx . . $ Level#start_delay.; |
| 101 | int restrict_coefcxx . . $ Level#restrict_coef.; |
| 102 | int fixed_coefcxx . . $ Level#fixed_coef.; |
| 103 | int speedcxx . . $ Level#speed.; |
| 104 | int requiredcxx . . $ Level#required.; |
| 105 | BackgroundTypecxx . . $ BackgroundType# backgroundcxx . . $ Level#background.; |
| 106 | |
| 107 | Listcxx . . $ List# * graph_dirscxx . . $ Level#graph_dirs.; |
| 108 | |
| 109 | structcxx . . $ Level#$anonymous_type_0# { |
| 110 | int rowcxx . . $ Level#$anonymous_type_0#row.; |
| 111 | int columncxx . . $ Level#$anonymous_type_0#column.; |
| 112 | PipeTypecxx . . $ Level#PipeType# typecxx . . $ Level#$anonymous_type_0#type.; |
| 113 | CardinalPointcxx . . $ CardinalPoint# restricted_output1cxx . . $ Level#$anonymous_type_0#restricted_output1.; |
| 114 | CardinalPointcxx . . $ CardinalPoint# restricted_output2cxx . . $ Level#$anonymous_type_0#restricted_output2.; |
| 115 | Bonuscxx . . $ Bonus# bonuscxx . . $ Level#$anonymous_type_0#bonus.; |
| 116 | bool fixedcxx . . $ Level#$anonymous_type_0#fixed.; |
| 117 | }pipetablecxx . . $ Level#pipetable.[BoardRowscxx . . $ BoardRows.*BoardColumnscxx . . $ BoardColumns.]; //Full Board |
| 118 | int npipescxx . . $ Level#npipes.; |
| 119 | }; |
| 120 | |
| 121 | #endif |
| 122 |