bot.gen
Class ConfigurableBoard

java.lang.Object
  extended bybot.gen.ConfigurableBoard
All Implemented Interfaces:
BoardGenerator, ConfigurableBoardGenerator
Direct Known Subclasses:
AcidPlus, Bounce, BullsEye, Islands, Looper, Maze, MeltingPath, PlusLoop, Room, TwistedHall

public abstract class ConfigurableBoard
extends Object
implements ConfigurableBoardGenerator

A basic toolkit for making boards and doing the difficulty scale configuration stuff.


Field Summary
 
Fields inherited from interface bot.ConfigurableBoardGenerator
BIG, DEFAULT_DIFFICULTY, EASY, HARD, MEDIUM, SMALL, TRIVIAL, VERY_HARD
 
Constructor Summary
ConfigurableBoard()
           
 
Method Summary
 int getDifficulty()
           
 int getDifficulty(int low, int high)
          Return difficulty, rescaled to [low, high]
 int getDifficulty(int low, int med, int high)
          Return difficulty, rescaled to [low, med, high].
 int getRandomizedDifficulty(int low, int med, int high, double per_flex)
          Get difficulty, tweaked by per_flex, a random percentage of the base computed difficulty.
 void setDifficulty(int v)
          set difficulty to a number from 0 (trivial) to 100 (very hard)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bot.BoardGenerator
generateBoard
 

Constructor Detail

ConfigurableBoard

public ConfigurableBoard()
Method Detail

setDifficulty

public void setDifficulty(int v)
set difficulty to a number from 0 (trivial) to 100 (very hard)

Specified by:
setDifficulty in interface ConfigurableBoardGenerator

getDifficulty

public int getDifficulty()
Specified by:
getDifficulty in interface ConfigurableBoardGenerator

getDifficulty

public int getDifficulty(int low,
                         int high)
Return difficulty, rescaled to [low, high]

Specified by:
getDifficulty in interface ConfigurableBoardGenerator

getDifficulty

public int getDifficulty(int low,
                         int med,
                         int high)
Return difficulty, rescaled to [low, med, high]. Will use a parabolic curve to hit all three points. med maps to 50. low needs to be >= 1.

Specified by:
getDifficulty in interface ConfigurableBoardGenerator

getRandomizedDifficulty

public int getRandomizedDifficulty(int low,
                                   int med,
                                   int high,
                                   double per_flex)
Get difficulty, tweaked by per_flex, a random percentage of the base computed difficulty. Difficulty could go up by per_flex % of the target or down by that much.