wiki:Old/Documentation/orbitHandler/printNodeSet

Version 2 (modified by cmdavies, 18 years ago) ( diff )

Documentation | !printNodeSet

Print Node Set

Displays all nodes in the node set as a grid

Usage

joeuser@console.sb1:~$ ./printNodeSet nodeset
Y
20 ********************
19 **.***************.*
18 ********************
17 ********************
16 ********************
15 ********************
14 *********.**********
13 ********************
12 *************.******
11 *.******************
10 ********************
9  ********************
8  *****.**************
7  ********************
6  ********************
5  ********************
4  ********************
3  ********************
2  ********************
1  ***.*****.**********
 X 12345678901234567890
            1         2

Source

#!/usr/bin/ruby
require 'orbit_Support'

puts "Y"
ons = OrbitNodeSets.new(ARGV[0])
for y in 1..20
    output = "#{21-y} "
    output = output + " " if (21-y).to_s.length == 1
    for x in 1..20

        if ons.isNodeSelected(x,21-y) then
            output = output + "*"
        else
            output = output + "."
        end
    end
    puts output

end
puts " X 12345678901234567890"
puts "            1         2"
Note: See TracWiki for help on using the wiki.