X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=dungeon-master%2Fgenerators%2Ftown.scm;h=feb38a0a36ab55f265f353ce79ff6d38c3b342b6;hb=fe9df14f96d3f1d45a26438a5df06e2259893eac;hp=e8e6d95b73ad6528105b08a3bb63881ddad031d6;hpb=35202c3698d8858b4d81347253e23fe6d4a01bef;p=dungeon-master.git diff --git a/dungeon-master/generators/town.scm b/dungeon-master/generators/town.scm index e8e6d95..feb38a0 100644 --- a/dungeon-master/generators/town.scm +++ b/dungeon-master/generators/town.scm @@ -1,3 +1,20 @@ +;;; Dungeon Master --- Adventure generator for GNU Guile +;;; Copyright © 2019 Javier Sancho +;;; +;;; Dungeon Master is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; Dungeon Master is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with Haunt. If not, see . + + (define-module (dungeon-master generators town) #:use-module (dungeon-master geom voronoi) #:use-module (dungeon-master geom point) @@ -17,7 +34,7 @@ (define (build-patches n-patches) (define* (get-points n seed #:optional (l '())) - (cond ((> n 0) + (cond ((>= n 0) (let* ((a (+ seed (* (sqrt n) 5))) (r (if (= n 0) 0