chiark
/
gitweb
/
~mdw
/
rocl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New .def files for Windows users.
[rocl]
/
elite-reach
diff --git
a/elite-reach
b/elite-reach
index 918d09bbcf1871f9e253819e76d02914f702261e..7e72204b30f958d97d3ddab752bae6bc18994d90 100755
(executable)
--- a/
elite-reach
+++ b/
elite-reach
@@
-1,16
+1,12
@@
#! /usr/bin/tclsh
#
#! /usr/bin/tclsh
#
-# $Id: elite-reach,v 1.
2 2003/02/25 00:25:38
mdw Exp $
+# $Id: elite-reach,v 1.
3 2003/03/07 00:41:46
mdw Exp $
-package require "elite" "1.0.
0
"
+package require "elite" "1.0.
1
"
proc reach {dist seed} {
proc reach {dist seed} {
- set ww [worldinfo $seed]
- puts -nonewline stderr "\[computing adjacency table..."
- adjacency $ww a $dist
- puts stderr " done\]"
- puts -nonewline stderr "\[painting..."
- flush stdout
+ set ww [elite-galaxylist $seed]
+ elite-adjacency a $ww $dist
foreach {s x w} $ww { set p($s) 1 }
set pp {}
while 1 {
foreach {s x w} $ww { set p($s) 1 }
set pp {}
while 1 {
@@
-34,7
+30,6
@@
proc reach {dist seed} {
}
lappend pp $cc
}
}
lappend pp $cc
}
- puts stderr " done\]\n"
foreach cc $pp {
set de 1
set l {}
foreach cc $pp {
set de 1
set l {}
@@
-63,7
+58,7
@@
for {set i 0} {$i < [llength $argv]} {incr i} {
switch -glob -- $a {
"-d" {
incr i
switch -glob -- $a {
"-d" {
incr i
- set d [expr {
[lindex $argv $i] * 10
}]
+ set d [expr {
int([lindex $argv $i] * 10)
}]
}
"-*" {
puts stderr "usage: $argv0 \[-d DIST\] \[GALAXY ...\]"
}
"-*" {
puts stderr "usage: $argv0 \[-d DIST\] \[GALAXY ...\]"