wyvern.util
Class Stars

java.lang.Object
  extended bywyvern.util.Stars

public class Stars
extends java.lang.Object

Utility for generating 5-pointed stars - you can use generateStar to create one in an array, then create an icon, map, or whatever using that pattern.

Version:
1.0, Nov 11, 2001
Author:
Steve Yegge

Constructor Summary
Stars()
           
 
Method Summary
static void drawLine(int x1, int y1, int x2, int y2, int[][] grid)
          Draws a line in the grid from (x1, x1) to (x2, y2)
static int[][] generateStar(int diameter)
          Generates a star of the passed diameter.
static void main(java.lang.String[] args)
          Do it.
static void printStar(int[][] star)
          Prints out a star as ASCII text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stars

public Stars()
Method Detail

main

public static void main(java.lang.String[] args)
Do it.


generateStar

public static int[][] generateStar(int diameter)
Generates a star of the passed diameter.


drawLine

public static void drawLine(int x1,
                            int y1,
                            int x2,
                            int y2,
                            int[][] grid)
Draws a line in the grid from (x1, x1) to (x2, y2)


printStar

public static void printStar(int[][] star)
Prints out a star as ASCII text.