Trees | Indices | Help |
---|
|
1 #!/bin/env python 2 # This Python file uses the following encoding=utf-8 3 4 # Schlachtfeld - Großkämpfe im EWS System 5 # http://rpg-tools-1d6.sf.net 6 # Copyright © 2007 - 2007 Achim Zien 7 8 # This program is free software; you can redistribute it and/or modify 9 # it under the terms of the GNU General Public License as published by 10 # the Free Software Foundation; either version 2 of the License, or 11 # (at your option) any later version. 12 13 # This program is distributed in the hope that it will be useful, 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 # GNU General Public License for more details. 17 18 # You should have received a copy of the GNU General Public License 19 # along with this program; if not, write to the Free Software 20 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 21 # MA 02110-1301 USA 22 23 24 #### IMPORTS #### 25 from random import randint as rnd 26 #### IMPORTS #### 27 28 29 #### FUNCTIONS #### 3032 tmp = rnd(0,5) 33 count = 1 34 if tmp in [0,5]: 35 while tmp == rnd(0,5): 36 count += 1 37 wurf = count*ews[tmp] 38 return wurf39 45 48 49 #### FUNCTIONS #### 50 51 52 #### GAME PARS #### 53 ews = [-5, -3, -1, 2, 4, 6] 54 #### GAME PARS #### 55 56 57 #### SELF CHECK #### 58 if __name__ == '__main__': 59 store = [] 60 for i in range(100000): 61 store.append(pmw6()) 62 print 'min max' 63 print min(store), max(store) 64 #### SELF CHECK #### 65
Trees | Indices | Help |
---|
Generated by Epydoc 3.0alpha3 on Wed Aug 8 12:24:35 2007 | http://epydoc.sourceforge.net |