Skip to content

Commit

Permalink
WIP - Do some ranges refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Kitty committed Dec 30, 2023
1 parent 73ffb65 commit 746289e
Show file tree
Hide file tree
Showing 76 changed files with 178 additions and 250 deletions.
1 change: 0 additions & 1 deletion Default Ranges/6 Max/RFI/BTN.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/RFI/CO.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/RFI/HJ.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/RFI/LJ.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/RFI/SB.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/BTN vs/BB Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/BTN vs/BB Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/BTN vs/SB Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/BTN vs/SB Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/CO vs/BB Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/CO vs/BB Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/CO vs/BTN Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/CO vs/BTN Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/CO vs/SB Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/CO vs/SB Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/HJ vs/BB Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/HJ vs/BB Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/HJ vs/BTN Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/HJ vs/BTN Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/HJ vs/CO Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/HJ vs/CO Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/HJ vs/SB Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/HJ vs/SB Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/LJ vs/BB Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/LJ vs/BB Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/LJ vs/BTN Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/LJ vs/BTN Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/LJ vs/CO Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/LJ vs/CO Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/LJ vs/SB Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/LJ vs/SB Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/SB vs/vs BB Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs 3Bet/SB vs/vs BB Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs BTN/BB Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs BTN/BB Raise.txt

This file was deleted.

Empty file.
1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs BTN/SB Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs CO/BB Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs CO/BB Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs CO/BTN Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs CO/BTN Raise.txt

This file was deleted.

Empty file.
1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs CO/SB Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs HJ/BB Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs HJ/BB Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs HJ/BTN Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs HJ/BTN Raise.txt

This file was deleted.

Empty file.
1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs HJ/CO Raise.txt

This file was deleted.

Empty file.
1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs HJ/SB Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs LJ/BB Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs LJ/BB Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs LJ/BTN Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs LJ/BTN Raise.txt

This file was deleted.

Empty file.
1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs LJ/CO Raise.txt

This file was deleted.

Empty file.
1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs LJ/HJ Raise.txt

This file was deleted.

Empty file.
1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs LJ/SB Raise.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs SB/BB Call.txt

This file was deleted.

1 change: 0 additions & 1 deletion Default Ranges/6 Max/vs RFI/vs SB/BB Raise.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.gtohelper.utility.Popups;
import com.gtohelper.utility.SaveFileHelper;
import javafx.application.Platform;
import javafx.beans.binding.Bindings;
import javafx.beans.property.*;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
Expand All @@ -18,8 +17,6 @@
import javafx.scene.input.MouseEvent;
import javafx.util.Callback;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.sql.SQLException;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
Expand Down Expand Up @@ -521,7 +518,7 @@ private void initializeSituationMaps() {
heroOOPSituationList.add(new SituationComboBoxMapping("2Bet - Villain calls vs Hero", Situation.RFI, LastAction.RAISE));
heroOOPSituationList.add(new SituationComboBoxMapping("3Bet - Hero calls vs Villain", Situation.V3BET, LastAction.CALL));
heroOOPSituationList.add(new SituationComboBoxMapping("4Bet - Villain calls vs Hero", Situation.V3BET, LastAction.RAISE));
heroOOPSituationList.add(new SituationComboBoxMapping("5Bet - Hero calls vs Villain", Situation.CALL5BET, LastAction.CALL));
heroOOPSituationList.add(new SituationComboBoxMapping("5Bet - Hero calls vs Villain", Situation.V5BET, LastAction.CALL));
}

private void getPositionVsPositionHands() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private String getFilePathRelativeToFolder(String folderPath, String filePath) {
}

public Ranges loadRangeFiles() {
return rangeFilesModel.loadRangeFiles(actionToRangeFileMap);
return rangeFilesModel.loadRangeFromRangeFolder(rangeFolderLocation.getText());
}

void loadFieldsFromModel() {
Expand All @@ -150,8 +150,8 @@ void loadFieldsFromModel() {
// If the range folder location DNE, like on first launch or user fuckery, we
// regenerate it from resources.
ClassLoader classLoader = RangeFilesController.class.getClassLoader();
InputStream inputStream = classLoader.getResourceAsStream("6 Max.zip");
String outputFolder = "Default Ranges/";
InputStream inputStream = classLoader.getResourceAsStream("Default-Cash-100bb.zip");
String outputFolder = "Ranges/";

try(ZipInputStream zipInputStream = new ZipInputStream(inputStream)) {
ZipEntry entry;
Expand All @@ -173,7 +173,7 @@ void loadFieldsFromModel() {
}

// Default range generation successful. Now let's update and set new folder location.
Path sixmaxFolderPath = Paths.get(outputFolder + "6 Max").toAbsolutePath();
Path sixmaxFolderPath = Paths.get(outputFolder + "Default-Cash-100bb").toAbsolutePath();
savedFolder = sixmaxFolderPath.toString();
rangeFilesModel.saveTextField("rangeFolderLocation", savedFolder);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,10 @@ private SolverOutput dispatchSolve(SolveTask solve, Work.WorkSettings settings,
RangeData ipRange = ranges.getRangeForHand(solve.getHandData().ipPlayer);

if(ipRange == null || oopRange == null) {
String error = String.format("Could not resolve range files for handId = %d (aka board %s, %d bet pot, with aggressor seats %s)",
solve.getHandData().id_hand, CardResolver.getBoardString(solve.getHandData()),
solve.getHandData().highestPreflopBetLevel, solve.getHandData().str_aggressors_p);
String error = String.format("No matching range exists for hand (board %s, %d bet pot, with PF aggressor seats %s)",
CardResolver.getBoardString(solve.getHandData()),
solve.getHandData().highestPreflopBetLevel,
solve.getHandData().str_aggressors_p);
Logger.log(error);
results.setError(error);
return results;
Expand Down
Loading

0 comments on commit 746289e

Please sign in to comment.