test-bin/test-dice.cxx

00001 // This program is free software; you can redistribute it and/or modify
00002 // it under the terms of the GNU General Public License as published by
00003 // the Free Software Foundation; either version 2 of the License, or
00004 // (at your option) any later version.
00005 // 
00006 // This program is distributed in the hope that it will be useful,
00007 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00008 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00009 // GNU Library General Public License for more details.
00010 // 
00011 // You should have received a copy of the GNU General Public License
00012 // along with this program; if not, write to the Free Software
00013 // Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
00014 
00015 #include <iostream>
00016 
00017 #include "dice.hpp"
00018 
00019 void d1d6Test(){
00020         std::cout << "100 six sided dice rollls:" << std::endl << std::endl;
00021         
00022         int ix;
00023         int iy;
00024         
00025         for(ix=0;ix<10;ix++){
00026                 for(iy=0;iy<10;iy++){
00027                         std::cout << d1d6() << " "; 
00028                 }
00029                 std::cout<< std::endl;
00030         
00031         }
00032         
00033 }
00034 
00035 void d2d6Test(){
00036         std::cout << "100 dual six sided dice rolls" << std::endl << std::endl;
00037         
00038                 int ix;
00039         int iy;
00040         
00041         for(ix=0;ix<10;ix++){
00042                 for(iy=0;iy<10;iy++){
00043                         std::cout << d2d6() << " "; 
00044                 }
00045                 std::cout<< std::endl;
00046         
00047         }
00048 }
00049 
00050 
00051 int main()
00052 {
00053         std::cout << "Testing the dice library" << std::endl;
00054         d1d6Test();
00055         d2d6Test();
00056         return 0;
00057 }

Generated on Fri Mar 7 16:40:53 2008 for frpuniverse by  doxygen 1.4.7