librejack

Blackjack clone written in java
git clone https://github.com/michaelneuper/librejack.git
README | Files | Log | Refs | LICENSE

commit 2ca294e6217be64080b6b2dbf180f9e1a4b5053f
parent 41b02f95301b36cb2ab17443480e960e700322d5
Author: Michael Neuper <73108749+michaelneuper@users.noreply.github.com>
Date:   Mon, 17 Oct 2022 15:15:10 +0200

remove makeDecision method

Diffstat:
Msrc/model/Player.java | 67-------------------------------------------------------------------
1 file changed, 0 insertions(+), 67 deletions(-)

diff --git a/src/model/Player.java b/src/model/Player.java @@ -48,71 +48,4 @@ public class Player extends Person { // this.balance = balance; // TODO: is neccesary? } -// /** -// * Allows the player to decide to hit or stand -// * -// * @param deck deck to draw from -// * @param discard deck to discard to -// */ -// public void makeDecision(Deck deck, Deck discard) { -// -// int decision = 1; // default decision is to stand -// boolean doubleDown = false; -// // 0 = stand -// // 1 = hit -// // 2 = double -// -// if(doubleDown) { -// // TODO: add message dialog saying they can't hit -// return; // don't allow them to hit again if they double -// } -// -// if(this.getHand().calculateValue() > 20) { -// return; // return if they have blackjack or busted -// } -// -// switch(decision) { -// case 0 : // stand -//// this.makeDecision(deck, discard); -// return; -// case 1 : // hit -// this.hit(deck, discard); // hit deck and discard -// break; -// case 2 : // double -// // TODO: double bet in gui -// doubleDown = true; -// this.hit(deck, discard); -// break; -// -// } -// -// // boolean getNum = true; -// -//// while(getNum) { -//// try { -//// System.out.println("Would you like to Hit[1] or Stand[2]"); -//// decision = input.nextInt(); -//// getNum = false; -// -//// } catch (Exception e) { -//// System.out.println("Error:\n" + e); -//// input.next(); -//// } -//// } -// -// // if they decide to hit -//// if (decision == 1) { // TODO: add option to double -//// -//// this.hit(deck, discard); // hit the deck and discard -//// -//// if(this.getHand().calculateValue() > 20) { -//// return; // return if they have blackjack or busted -//// } else { -//// this.makeDecision(deck, discard); // allow them to hit or stand if they don't have 21 or blackjack -//// } -//// } else { -//// System.out.println("You stand."); // assume they stand if they hit a number other than 1 -//// } -// } - }