gtheler před 5 roky
rodič
revize
116659d94b
3 změnil soubory, kde provedl 11 přidání a 7 odebrání
  1. +10
    -1
      TODO
  2. +1
    -1
      src/conf.cpp
  3. +0
    -5
      src/main.cpp

+ 10
- 1
TODO Zobrazit soubor

@@ -1,6 +1,15 @@
* handle no readline
* named pipes (a.k.a FIFOs)
* eV = expected value = return
* check that the card distribution is uniform
* initial bankroll
* report
* as a file
* format (yaml, json, markdown table)
* size (extra small, small, medium, large, extra large)
* flat_bet implies =1
* parse 1e5 in hands
* trap ctrl+c and write report anyway
* trap ctrl+c and write report anyway (not sure how to pass arguments to signal handler)
* flag to see if a conf string was used or not
* to_string() for floats
* max_splits through conf (default 3)

+ 1
- 1
src/conf.cpp Zobrazit soubor

@@ -139,7 +139,7 @@ Configuration::Configuration(int argc, char **argv) {
if (set(player, {"player"}) == false) {
// if we are on an interactive terminal we play through tty otherwise stdinout
if (isatty(0) && isatty(1)) {
if (isatty(fileno(stdin)) && isatty(fileno(stdout))) {
player = "tty";
} else {
player = "stdio";

+ 0
- 5
src/main.cpp Zobrazit soubor

@@ -69,11 +69,6 @@ int main(int argc, char **argv) {
// assign player to dealer
dealer->setPlayer(player);

// TODO: check and/or choose in the conf
// std::setlinebuf(stdout);
// std::setvbuf(stdout, NULL, _IOLBF, 0);
// std::setvbuf(stdin, NULL, _IOLBF, 0);

// let the action begin!
unsigned int unknownCommands = 0;
dealer->nextAction = Libreblackjack::DealerAction::StartNewHand;

Načítá se…
Zrušit
Uložit