cactpot-solver
A FFXIV Mini cactpot solver
Example
const CactpotSolver = ; // Initiate a new instance of a cactpot-solver// You can pass an object which will serve as the optionsvar solver = // Whether or not the statuses on rows and scratches update when a scratch is changed autoUpdating: true // The default value a payout is set to. When its reset it will be reset to this value passed defaultPayout: '6': 10000 '7': 36 '8': 720 '9': 360 '10': 80 '11': 252 '12': 108 '13': 72 '14': 54 '15': 180 '16': 72 '17': 180 '18': 119 '19': 36 '20': 306 '21': 1080 '22': 144 '23': 1800 '24': 3600 // solver.scratchValue(scratchID) Returns the scratch value// solver.scratchValue(scratchID, newValue) Sets the scratch value and returns it;solver;solver;solver;solver; // solver.scratch(scratchID) Returns the instanced Scratch classconsole; // => true; solver;console; // => false;console; // => true;console; // => true; console; // => 10000;console; // => 10000;console; // => 2;console; // => 2;
const CactpotSolver = ;var solver = ;
CactpotSolver Methods
const CactpotSolver = ;var solver = ; //Methods solver // Returns a Map of the Payoutssolver // Returns a Payout;solver // Returns the value of that Payout. If a value you is passed then it sets that Payout's value. solver // Returns a Map of the Scratchessolver // Returns a Scratch;solver // Returns the value of that Scratch. If a value you is passed then it sets that Scratch's value. solverrows // Returns a Map of the rowssolver // Returns a Row solver // Used if you have the autoUpdating set to false solver // Used to reset the scratches and payouts to their default value;solver // Used to reset the scratches to 0;solver // Used to reset the payouts to their deafult value;
Scratch Properties
const CactpotSolver = ;var solver = ;var scratch = solver; scratchvalue // The value the Scratch is set to. [0-9] are valid values. 0 = unsetscratchbest // If the scrtach is best. Best is true if there are 4 scratches set and the Scratch is apart of the Best row.scratchoptimal // If the Scratch is optimal. Optimal is true if there isn't enough set scratches to determin the best. So based off of what we know the Scratches with the best potential have optimal set to true.scratchproblem // If the scratch is a problem. Problems can be if there are duplicate values on different Scratches, or if there are too many values set. // Scratch IDs////// ╔═══╦═══╦═══╗// ║ 0 ║ 1 ║ 2 ║// ╠═══╬═══╬═══╣// ║ 3 ║ 4 ║ 5 ║// ╠═══╬═══╬═══╣// ║ 6 ║ 7 ║ 8 ║// ╚═══╩═══╩═══╝
Row Properties
const CactpotSolver = ;var solver = ;var row = solver; //or row = solver.row('678'); rowx // ScratchID of the first in the rowrowy // ScratchID of the second in the rowrowz // ScratchID of the third in the rowrowmean // The mean of the possibilitiesrowlow // The lowest number of the possibilitiesrowhigh // the highest number of the possibilitiesrowpossibilities // An array of the the possible outcomes for that rowrowbest // If the row is the best. The best is true when 4 Scratches are set and the row has the highest mean of all the rows; // Row IDs//// d e f g h // ╔═══╦═══╦═══╗// c ║ ║ ║ ║// ╠═══╬═══╬═══╣// b ║ ║ ║ ║// ╠═══╬═══╬═══╣// a ║ ║ ║ ║// ╚═══╩═══╩═══╝//// 048 036 147 258 246// ╔═══╦═══╦═══╗// 012 ║ ║ ║ ║// ╠═══╬═══╬═══╣// 345 ║ ║ ║ ║// ╠═══╬═══╬═══╣// 678 ║ ║ ║ ║// ╚═══╩═══╩═══╝
Payout Properties
const CactpotSolver = ;var solver = ;var payout = solver; payoutvalue // The value of the payoutpayoutdefault // The default of this payouts value. When the payout is reset its value becomes the default