valueIterationUmgebung.h

gehe zur Dokumentation dieser Datei
00001 #ifndef ENVIRONMENT_H
00002 #define ENVIRONMENT_H
00003 
00004 #define XMAX   100
00005 #define YMAX   100
00006 
00007 #define NUMBEROFACTIONS 04
00008 
00009 #define UP  00
00010 #define DOWN   01
00011 #define LEFT   02
00012 #define RIGHT  03
00013 #define NOTHING     04
00014 
00015 int xPos, yPos;
00016 
00017 
00018 
00024 int peter_move(int action) {
00025    switch(action) {
00026       case DOWN:  {
00027          yPos++;
00028          break;
00029       }
00030       case UP: {
00031          yPos--;
00032          break;
00033       }
00034       case RIGHT: {
00035          xPos++;
00036          if(yPos == 0) return -1;
00037          break;
00038       }
00039       case LEFT:  {
00040          xPos--;
00041          if(yPos == 0) return 1;
00042          break;
00043       }
00044    }
00045    return 0;
00046 }
00047 
00048 #endif

Erzeugt am Mon Nov 24 15:30:59 2008 für Walking Robot Simulation GUI - API Documentation von  doxygen 1.5.5