diff --git a/.gitignore b/.gitignore index 03ee4a3..1682205 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ pubspec.lock *.xml +*.xml +pubspec.lock +.idea/libraries/Dart_SDK.xml diff --git a/.idea/Dart_Functions_BlackJack_Stripped.iml b/.idea/Dart_Functions_BlackJack_Stripped.iml index 90642e6..91a60ea 100644 --- a/.idea/Dart_Functions_BlackJack_Stripped.iml +++ b/.idea/Dart_Functions_BlackJack_Stripped.iml @@ -9,6 +9,8 @@ + + \ No newline at end of file diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml index aabc5f1..cd79524 100644 --- a/.idea/libraries/Dart_SDK.xml +++ b/.idea/libraries/Dart_SDK.xml @@ -13,6 +13,8 @@ + + diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 27f18ff..35eb1dd 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -2,6 +2,5 @@ - \ No newline at end of file diff --git a/bin/BlackJack.dart b/bin/BlackJack.dart index f527eab..d922932 100644 --- a/bin/BlackJack.dart +++ b/bin/BlackJack.dart @@ -8,6 +8,27 @@ import 'package:BlackJack/functions/deal_card.dart'; */ void main() { + Welcome(); + int? bankRoll = BuyIn(); + while(bankRoll! > 0) { + List?deck = ShuffledDeck(); + List?playerHand = []; + List?houseHand = []; + InitialDeal(playerHand, houseHand, deck); + int? bet = PlaceBet(bankRoll); + //DealCard(deck); + HitOrStay(playerHand, houseHand, deck); + if (CheckIfBusted(playerHand) == true) { + CheckWinner(playerHand, houseHand, bankRoll, bet); + } else { + HousePlays(houseHand, deck); + } + // Status(playerHand, houseHand); + bankRoll = CheckWinner(playerHand, houseHand, bankRoll, bet); + print(bankRoll); + + //returnHands() + } } diff --git a/lib/functions/avoidNullChecks.dart b/lib/functions/avoidNullChecks.dart new file mode 100644 index 0000000..1079a17 --- /dev/null +++ b/lib/functions/avoidNullChecks.dart @@ -0,0 +1,40 @@ +import 'dart:io'; + +double nullEscapeAndConvertToDouble() { + String? number; + double? parsedNumber; + + while (parsedNumber == null) { + print("Please enter a valid number: "); + number = stdin.readLineSync(); + + if (number != null) { + parsedNumber = double.tryParse(number); + } + + if (parsedNumber == null) { + print("Invalid option"); + } + } + + return parsedNumber; +} + +int nullEscapeAndConvertToInt() { + String? number; + int? parsedNumber; + + while (parsedNumber == null) { + number = stdin.readLineSync(); + + if (number != null) { + parsedNumber = int.tryParse(number); + } + + if (parsedNumber == null) { + print("Invalid option"); + } + } + + return parsedNumber; +} \ No newline at end of file diff --git a/lib/functions/card_namer.dart b/lib/functions/card_namer.dart index 34f206a..beed135 100644 --- a/lib/functions/card_namer.dart +++ b/lib/functions/card_namer.dart @@ -5,6 +5,35 @@ When given an integer between 1-13, it should return the name of the corresponding card (Ignore the suit) */ -String CardNamer(int i){ - +String? CardNamer(int i){ + var cardName; + switch (i) { + case 1: + return 'A'; + case 2: + return '2'; + case 3: + return '3'; + case 4: + return '4'; + case 5: + return '5'; + case 6: + return '6'; + case 7: + return '7'; + case 8: + return '8'; + case 9: + return '9'; + case 10: + return '10'; + case 11: + return 'J'; + case 12: + return 'Q'; + case 13: + return 'K'; + } + return cardName; } diff --git a/lib/functions/check_if_busted.dart b/lib/functions/check_if_busted.dart index 4ee9ed6..0f6a119 100644 --- a/lib/functions/check_if_busted.dart +++ b/lib/functions/check_if_busted.dart @@ -22,7 +22,10 @@ Example inputs if ... true eða false, return true eða false */ - bool CheckIfBusted(List hand){ - -} + int? sumOfCards = CalculateScore(hand); + if(sumOfCards! > 21){ + return true; + } + return false; +} \ No newline at end of file diff --git a/lib/functions/check_winner.dart b/lib/functions/check_winner.dart index d01e38d..8fd41f8 100644 --- a/lib/functions/check_winner.dart +++ b/lib/functions/check_winner.dart @@ -15,6 +15,24 @@ of the user, which should have decreased/increased based on if he won or not. import 'package:BlackJack/functions/functions.dart'; -int CheckWinner(List playerHand, List houseHand, int currentBankRoll, int currentBet){ +int? CheckWinner(List playerHand, List houseHand, int currentBankRoll, int currentBet){ -} \ No newline at end of file + int? playerScore = CalculateScore(playerHand); + int? houseScore = CalculateScore(houseHand); + + if(CheckIfBusted(houseHand)){ + // WIN + currentBankRoll += currentBet; + } else { + if ( playerScore! > houseScore! && CheckIfBusted(playerHand) == false) { + // Win + currentBankRoll += currentBet; + print("You Win!"); + } else { + currentBankRoll -= currentBet; + print("You Lose!"); + } + } + ShowAllCards(playerHand, houseHand); + return currentBankRoll; +} diff --git a/lib/functions/deal_card.dart b/lib/functions/deal_card.dart index 3b88502..4c283af 100644 --- a/lib/functions/deal_card.dart +++ b/lib/functions/deal_card.dart @@ -13,5 +13,9 @@ print(deck); // Should print [2, 3, 4] */ int DealCard(List deck){ + //int cardNumber = 0; + int cardNumber = deck[0]; + deck.removeAt(0); + return cardNumber; } \ No newline at end of file diff --git a/lib/functions/deck_of_cards.dart b/lib/functions/deck_of_cards.dart index 9e6fb11..a04f1ce 100644 --- a/lib/functions/deck_of_cards.dart +++ b/lib/functions/deck_of_cards.dart @@ -12,7 +12,16 @@ List DeckOfCards() { List Cards = []; List Deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]; List Suits = ["Spaði", "Tígul", "Hjarta", "Lauf"]; + + for (int i = 0; i < Suits.length; i++) { + for (int j = 0; j < Deck.length; j++) { + Cards.add(Deck[j]); + } + } + + return Cards; } + diff --git a/lib/functions/draw_card.dart b/lib/functions/draw_card.dart index 04f09c1..e4c21ff 100644 --- a/lib/functions/draw_card.dart +++ b/lib/functions/draw_card.dart @@ -21,6 +21,7 @@ Add function */ -void DrawCard(List hand, List deck){ +void DrawCard(List hand, List deck){ + hand.add(DealCard(deck)); } \ No newline at end of file diff --git a/lib/functions/initial_deal.dart b/lib/functions/initial_deal.dart index b31c3ef..0709928 100644 --- a/lib/functions/initial_deal.dart +++ b/lib/functions/initial_deal.dart @@ -1,3 +1,5 @@ +import 'package:BlackJack/functions/deal_card.dart'; + import 'draw_card.dart'; /* @@ -22,6 +24,10 @@ print(dealerHand); // Should print [2, 4] */ -void InitialDeal(List playerHand, List houseHand, List deck){ +void InitialDeal(List playerHand, List houseHand, List deck){ + DrawCard(playerHand, deck); + DrawCard(houseHand, deck); + DrawCard(playerHand, deck); + DrawCard(houseHand, deck); } \ No newline at end of file diff --git a/lib/functions/money_grab.dart b/lib/functions/money_grab.dart index b397dee..603a6a2 100644 --- a/lib/functions/money_grab.dart +++ b/lib/functions/money_grab.dart @@ -19,10 +19,40 @@ Can you design the function such that it will ask the user again if he doesn't input a integer? */ -int PlaceBet(int bankRoll) { +int getInteger(){ + int number = 0; + try { + number = int.tryParse(stdin.readLineSync()!) !- 0; + } catch (e){ + print("You have to input a number!"); + getInteger(); + } + return number; } -int BuyIn() { +int PlaceBet(int bankRoll) { + if (bankRoll == 0){ + print("Error: no available funds."); + BuyIn(); + } + print("Give me an amount you want to bet"); + int amount = getInteger(); + if (amount > bankRoll){ + print("You only have $bankRoll to play with! Pick a lower number."); + PlaceBet(bankRoll); + return amount; + } else if (amount == 0) { + print("You can't bet 0! Try again."); + PlaceBet(bankRoll); + return amount; + } else { + return amount; + } +} -} \ No newline at end of file +int BuyIn() { + print("How large is your buy in?"); + int amount = getInteger(); + return amount; +} diff --git a/lib/functions/option_select.dart b/lib/functions/option_select.dart index 981a9b9..940374f 100644 --- a/lib/functions/option_select.dart +++ b/lib/functions/option_select.dart @@ -1,4 +1,5 @@ import 'dart:io'; +import 'avoidNullChecks.dart'; /* Create a function called OptionSelect which takes in a list of options, prints them out to the user and asks for the user to select an option. @@ -18,6 +19,13 @@ that the function will simply ask the user again to input an answer? */ -int OptionSelect(String statement, List options) { +int? OptionSelect(String statement, List options) { + print(statement); + for(int i = 0; i < options.length; i++){ + print("${i+1}. ${options[i]}"); + } + int userOption; + userOption = nullEscapeAndConvertToInt(); + return userOption; } \ No newline at end of file diff --git a/lib/functions/return_hand.dart b/lib/functions/return_hand.dart index 543b98f..cdfcdd9 100644 --- a/lib/functions/return_hand.dart +++ b/lib/functions/return_hand.dart @@ -13,11 +13,21 @@ print(hand); // Should print [] void ReturnHand(List hand, List deck){ - + for (var item in hand) { + deck.add(item); + } + hand.clear(); } void ReturnHands(List playerHand, List houseHand, List deck){ - + for (var item in playerHand) { + deck.add(item); + } + for (var item in houseHand) { + deck.add(item); + } + playerHand.clear(); + houseHand.clear(); } /* Then create another function called ReturnHands that uses the above function diff --git a/lib/functions/score_function.dart b/lib/functions/score_function.dart index 12e7e97..74d38ba 100644 --- a/lib/functions/score_function.dart +++ b/lib/functions/score_function.dart @@ -1,4 +1,3 @@ - /* Create a function called CalculateScore that can calculate the score of a given hand of cards. The score is blackjack score, so the following rules apply @@ -21,7 +20,22 @@ gets the score 1. So if the method gets the hand [1, 1] the score would be 12 hand = [7, 1] -> Score 18 */ -int CalculateScore(List hand){ - +int? CalculateScore(List hand){ + int sum = 0; + bool checkIfAce = false; + for (int number in hand) { + if (number == 1 && checkIfAce == false){ + checkIfAce = true; + sum += 11; + } else if (number == 1 && checkIfAce == true) { + sum += 1; + } else if(number >= 2 && number <= 10) { + sum += number; + } else if (number >= 11 && number <= 13){ + sum += 10; + } + } + print('sum: $sum'); + return sum; } diff --git a/lib/functions/shuffled_deck.dart b/lib/functions/shuffled_deck.dart index d100f4d..f0e9303 100644 --- a/lib/functions/shuffled_deck.dart +++ b/lib/functions/shuffled_deck.dart @@ -9,5 +9,9 @@ And when run, returns a shuffled deck of cards. No inputs, only output. */ List ShuffledDeck(){ + List _shuffledDeck = Shuffler(DeckOfCards())!; + print("A deck of cards has been shuffled"); + //print('Log - shuffled-deck: ${_shuffledDeck}'); + return _shuffledDeck; } \ No newline at end of file diff --git a/lib/functions/shuffler.dart b/lib/functions/shuffler.dart index 2e980ac..58fe1c9 100644 --- a/lib/functions/shuffler.dart +++ b/lib/functions/shuffler.dart @@ -7,6 +7,8 @@ and outputs a shuffled list of integers. I.e, it should return a RANDOMIZED version of the list. */ -List Shuffler(List theList){ +List? Shuffler(List theList){ + theList.shuffle(); + return theList; } \ No newline at end of file diff --git a/lib/functions/status.dart b/lib/functions/status.dart index bf31751..1ec1a1b 100644 --- a/lib/functions/status.dart +++ b/lib/functions/status.dart @@ -15,10 +15,23 @@ hand before showdown.) */ List CardNameList(List playerHand){ - + List output = []; + for(var card in playerHand){ + output.add(CardNamer(card)!); + } + return output; } void Status(List playerHand, List houseHand){ - + print("Here is your hand:"); + print(CardNameList(playerHand)); + print("Here is the dealers hand:"); + print(CardNamer(houseHand[0])); } +void ShowAllCards(List playerHand, List houseHand){ + print("Here is your hand:"); + print(CardNameList(playerHand)); + print("Here is the dealers hand:"); + print(CardNameList(houseHand)); +} diff --git a/lib/functions/welcome.dart b/lib/functions/welcome.dart index 5478ebc..9c5d358 100644 --- a/lib/functions/welcome.dart +++ b/lib/functions/welcome.dart @@ -9,5 +9,9 @@ that has no input and simply prints a text. */ void Welcome(){ - + print('************************************************'); + print('Welcome to the BEST BlackJack game OF YOUR LIFE!'); + print('************************************************'); + print('GET READY TO LOSE ALL YOUR MONEY'); + print('************************************************'); } \ No newline at end of file diff --git a/lib/hit_or_stay.dart b/lib/hit_or_stay.dart index 9430f61..42820c1 100644 --- a/lib/hit_or_stay.dart +++ b/lib/hit_or_stay.dart @@ -22,7 +22,34 @@ tell him what card he drew and print the current information of the game. If he busts after drawing this card, break the loop as well. */ + void HitOrStay(List playerHand, List houseHand, List deck){ + print("LOG: HitOrStay started"); List options = ['Hit', 'Stay', 'Quit']; + int? userRequest = null; + int? drawnCard = null; + + while(userRequest != 3 || CheckIfBusted(playerHand) == false){ + Status(playerHand, houseHand); + userRequest = OptionSelect('Pick an option:', options); + if(userRequest == 1){ // Hit + drawnCard = DealCard(deck); + print("You have drawn: $drawnCard"); + playerHand.add(drawnCard); + if(CheckIfBusted(playerHand)){ + print("You busted"); + Status(playerHand, houseHand); + return; + } + } else if(userRequest == 2 ){ + print("You have selected Stay"); // Stay + return; + } else if(userRequest == 3){ // Quit + return; + } else { + print("Not a valid option."); + } + } + print("LOG: HitOrStay completed"); } \ No newline at end of file diff --git a/lib/house_plays.dart b/lib/house_plays.dart index 8be70b8..21a06e0 100644 --- a/lib/house_plays.dart +++ b/lib/house_plays.dart @@ -20,5 +20,30 @@ show the score of the house. */ void HousePlays(List houseHand, List deck){ + print('LOG: housePlays started'); + print("Before drawing score: ${CalculateScore(houseHand)}"); + int? sumOfHouseHand = CalculateScore(houseHand); + int drawnCard; + while(sumOfHouseHand! < 17){ + print("Score of dealer: $sumOfHouseHand"); + drawnCard = DealCard(deck); + houseHand.add(drawnCard); + print("The dealer drew ${CardNamer(drawnCard)}"); + //sumOfHouseHand += drawnCard; + sumOfHouseHand = CalculateScore(houseHand); + } + /* + do { + print("Score of dealer: $sumOfHouseHand"); + drawnCard = DealCard(deck); + houseHand.add(drawnCard); + print("The dealer drew ${CardNamer(drawnCard)}"); + //sumOfHouseHand += drawnCard; + sumOfHouseHand = CalculateScore(houseHand); + } while (sumOfHouseHand! < 17); + */ + + print("Dealer score: $sumOfHouseHand"); + print("LOG: housePlays ended"); } diff --git a/pubspec.lock b/pubspec.lock index 2af4907..8d7a7fb 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,323 +5,369 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + url: "https://pub.dev" source: hosted - version: "49.0.0" + version: "61.0.0" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.dartlang.org" + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "5.13.0" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.2" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.18.0" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" source: hosted version: "3.1.1" coverage: dependency: transitive description: name: coverage - url: "https://pub.dartlang.org" + sha256: "595a29b55ce82d53398e1bcc2cba525d7bd7c59faeb2d2540e9d42c390cfeeeb" + url: "https://pub.dev" source: hosted - version: "1.6.1" + version: "1.6.4" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" source: hosted version: "6.1.4" frontend_server_client: dependency: transitive description: name: frontend_server_client - url: "https://pub.dartlang.org" + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.2.0" glob: dependency: transitive description: name: glob - url: "https://pub.dartlang.org" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.dartlang.org" + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" source: hosted version: "3.2.1" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" source: hosted version: "4.0.2" io: dependency: transitive description: name: io - url: "https://pub.dartlang.org" + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "0.6.7" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.16" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.11.0" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.0.4" node_preamble: dependency: transitive description: name: node_preamble - url: "https://pub.dartlang.org" + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.2" package_config: dependency: transitive description: name: package_config - url: "https://pub.dartlang.org" + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" source: hosted version: "2.1.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.8.3" pedantic: dependency: "direct dev" description: name: pedantic - url: "https://pub.dartlang.org" + sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" + url: "https://pub.dev" source: hosted version: "1.11.1" pool: dependency: transitive description: name: pool - url: "https://pub.dartlang.org" + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" source: hosted version: "1.5.1" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.dartlang.org" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" shelf: dependency: transitive description: name: shelf - url: "https://pub.dartlang.org" + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.4.1" shelf_packages_handler: dependency: transitive description: name: shelf_packages_handler - url: "https://pub.dartlang.org" + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" shelf_static: dependency: transitive description: name: shelf_static - url: "https://pub.dartlang.org" + sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.dartlang.org" + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.0.4" source_map_stack_trace: dependency: transitive description: name: source_map_stack_trace - url: "https://pub.dartlang.org" + sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" source_maps: dependency: transitive description: name: source_maps - url: "https://pub.dartlang.org" + sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + url: "https://pub.dev" source: hosted - version: "0.10.10" + version: "0.10.12" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" test: dependency: "direct dev" description: name: test - url: "https://pub.dartlang.org" + sha256: "13b41f318e2a5751c3169137103b60c584297353d4b1761b66029bae6411fe46" + url: "https://pub.dev" source: hosted - version: "1.21.6" + version: "1.24.3" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + url: "https://pub.dev" source: hosted - version: "0.4.14" + version: "0.6.0" test_core: dependency: transitive description: name: test_core - url: "https://pub.dartlang.org" + sha256: "99806e9e6d95c7b059b7a0fc08f07fc53fabe54a829497f0d9676299f1e8637e" + url: "https://pub.dev" source: hosted - version: "0.4.18" + version: "0.5.3" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" vm_service: dependency: transitive description: name: vm_service - url: "https://pub.dartlang.org" + sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583 + url: "https://pub.dev" source: hosted - version: "9.4.0" + version: "11.10.0" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" + url: "https://pub.dev" source: hosted version: "1.0.2" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.0" webkit_inspection_protocol: dependency: transitive description: name: webkit_inspection_protocol - url: "https://pub.dartlang.org" + sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" + url: "https://pub.dev" source: hosted version: "1.2.0" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" sdks: - dart: ">=2.18.0 <3.0.0" + dart: ">=2.19.0 <3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 754dc36..865402b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ description: A sample command-line application. # homepage: https://www.example.com environment: - sdk: '>=2.11.0 <3.0.0' + sdk: '>=2.12.0 <3.0.0' #dependencies: # path: ^1.7.0 diff --git a/test/BlackJack_test.dart b/test/BlackJack_test.dart index 5cac432..a20d242 100644 --- a/test/BlackJack_test.dart +++ b/test/BlackJack_test.dart @@ -1,3 +1,5 @@ + +/* import 'package:BlackJack/BlackJack.dart'; import 'package:test/test.dart'; @@ -6,3 +8,4 @@ void main() { expect(calculate(), 42); }); } +*/