import { Random } from "./random" ; export { PolygonConfig , RandomPolygonConfig } ; class PolygonConfig { constructor ( private sides , private circles , private arcs ) { } Sides ( ) { return this . sides ; } Circles ( ) { return this . circles ; } Arcs ( ) { return this . arcs ; } Shorthand ( ) { return this . sides + ( this . circles ? "T" : "F" ) + ( this . arcs ? "T" : "F" ) ; } } function RandomPolygonConfig ( random ) { return new PolygonConfig ( 3 + Math . round ( random . nextFloat ( ) * 5 ) , random . nextFloat ( ) >= 0.5 , random . nextFloat ( ) >= 0.5 ) ; }