Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

diamon.h

00001 /***************************************************************************
00002                         diamon.h  -  description
00003                             -------------------
00004     begin                : july 2nd, 2006
00005     copyright            : (C) 2006 by Frédéric RODRIGO
00006     email                : f.rodrigo free.fr
00007     
00008     $Id: diamon.h 83 2006-11-05 20:46:42Z neoneurone $
00009  ***************************************************************************/
00010 
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   any later version.                                                    *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifndef _OPENCITY_DIAMON_H_
00021 #define _OPENCITY_DIAMON_H_ 1
00022 
00023 #include "generator.h"
00024 
00025 namespace MapGen
00026 {
00027 
00032 class Diamon: public Generator {
00033 public:
00035     Diamon( uint order );
00036 
00037     Map* render() const;
00038 
00039 private:
00040     uint    _side;
00041     
00042     /* return a random in [-p..p[ */
00043     float _all( const uint p ) const;
00044 
00045     /* recursive render */
00046     void _sub(
00047         Map* map,
00048         const uint x1,
00049         const uint y1,
00050         const uint x2,
00051         const uint y2 ) const;
00052 
00053 };
00054 
00055 }
00056 
00057 #endif

Generated on Sat Nov 11 10:21:09 2006 for OpenCity by  doxygen 1.4.2