diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json new file mode 100644 index 0000000..675139f --- /dev/null +++ b/.dart_tool/package_config.json @@ -0,0 +1,315 @@ +{ + "configVersion": 2, + "packages": [ + { + "name": "_fe_analyzer_shared", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/_fe_analyzer_shared-73.0.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "_macros", + "rootUri": "file:///Users/zhivkodimov/Documents/dart-sdk/pkg/_macros", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "analyzer", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/analyzer-6.8.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "args", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/args-2.6.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "async", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/async-2.12.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "boolean_selector", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/boolean_selector-2.1.2", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "collection", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/collection-1.19.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "convert", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/convert-3.1.2", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "coverage", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/coverage-1.10.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "crypto", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/crypto-3.0.6", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "file", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/file-7.0.1", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "frontend_server_client", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/frontend_server_client-4.0.0", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "glob", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/glob-2.1.2", + "packageUri": "lib/", + "languageVersion": "2.19" + }, + { + "name": "http_multi_server", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/http_multi_server-3.2.1", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "http_parser", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/http_parser-4.1.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "io", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/io-1.0.4", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "js", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/js-0.7.1", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "logging", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/logging-1.3.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "macros", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/macros-0.1.2-main.4", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "matcher", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/matcher-0.12.16+1", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "meta", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/meta-1.16.0", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "mime", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/mime-2.0.0", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "node_preamble", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/node_preamble-2.0.2", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "package_config", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/package_config-2.1.0", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "path", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/path-1.9.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "pedantic", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/pedantic-1.11.1", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "pool", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/pool-1.5.1", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "pub_semver", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/pub_semver-2.1.4", + "packageUri": "lib/", + "languageVersion": "2.17" + }, + { + "name": "shelf", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/shelf-1.4.2", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "shelf_packages_handler", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/shelf_packages_handler-3.0.2", + "packageUri": "lib/", + "languageVersion": "2.17" + }, + { + "name": "shelf_static", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/shelf_static-1.1.3", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "shelf_web_socket", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/shelf_web_socket-2.0.0", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "source_map_stack_trace", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/source_map_stack_trace-2.1.2", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "source_maps", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/source_maps-0.10.12", + "packageUri": "lib/", + "languageVersion": "2.18" + }, + { + "name": "source_span", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/source_span-1.10.0", + "packageUri": "lib/", + "languageVersion": "2.18" + }, + { + "name": "stack_trace", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/stack_trace-1.12.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "stream_channel", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/stream_channel-2.1.2", + "packageUri": "lib/", + "languageVersion": "2.19" + }, + { + "name": "string_scanner", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/string_scanner-1.4.0", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "term_glyph", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/term_glyph-1.2.1", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "test", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/test-1.25.8", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "test_api", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/test_api-0.7.3", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "test_core", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/test_core-0.6.5", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "typed_data", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/typed_data-1.4.0", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "vm_service", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/vm_service-14.3.1", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "watcher", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/watcher-1.1.0", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "web", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/web-1.1.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "web_socket", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/web_socket-0.1.6", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "web_socket_channel", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/web_socket_channel-3.0.1", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "webkit_inspection_protocol", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/webkit_inspection_protocol-1.2.1", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "yaml", + "rootUri": "file:///Users/zhivkodimov/.pub-cache/hosted/pub.dev/yaml-3.1.2", + "packageUri": "lib/", + "languageVersion": "2.19" + }, + { + "name": "BlackJack", + "rootUri": "../", + "packageUri": "lib/", + "languageVersion": "3.0" + } + ], + "generated": "2024-10-26T12:41:26.291051Z", + "generator": "pub", + "generatorVersion": "3.5.3", + "pubCache": "file:///Users/zhivkodimov/.pub-cache" +} diff --git a/.dart_tool/pub/bin/test/test.dart-3.5.3.snapshot b/.dart_tool/pub/bin/test/test.dart-3.5.3.snapshot new file mode 100644 index 0000000..1adc12e Binary files /dev/null and b/.dart_tool/pub/bin/test/test.dart-3.5.3.snapshot differ diff --git a/.dart_tool/test/incremental_kernel.Ly9AZGFydD0zLjA= b/.dart_tool/test/incremental_kernel.Ly9AZGFydD0zLjA= new file mode 100644 index 0000000..2d98fa6 Binary files /dev/null and b/.dart_tool/test/incremental_kernel.Ly9AZGFydD0zLjA= differ diff --git a/.idea/Dart_Functions_BlackJack_Stripped.iml b/.idea/Dart_Functions_BlackJack_Stripped.iml index ae9af97..90642e6 100644 --- a/.idea/Dart_Functions_BlackJack_Stripped.iml +++ b/.idea/Dart_Functions_BlackJack_Stripped.iml @@ -10,6 +10,5 @@ - \ No newline at end of file diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml index cf13806..123fb10 100644 --- a/.idea/libraries/Dart_Packages.xml +++ b/.idea/libraries/Dart_Packages.xml @@ -5,398 +5,406 @@ - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - - - - - - + - - - - - - - - + - - + - - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml index d59798d..e4e00d3 100644 --- a/.idea/libraries/Dart_SDK.xml +++ b/.idea/libraries/Dart_SDK.xml @@ -1,27 +1,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/bin/BlackJack.dart b/bin/BlackJack.dart index b1e9a3d..f3fa9d0 100644 --- a/bin/BlackJack.dart +++ b/bin/BlackJack.dart @@ -1,10 +1,10 @@ import 'package:BlackJack/functions/functions.dart'; import 'package:BlackJack/lib.dart'; - /* Can you puzzle the methods together to form the game? */ void main() { - + Welcome(); + } diff --git a/lib/functions/card_namer.dart b/lib/functions/card_namer.dart index 1cfc4d3..2f88dc7 100644 --- a/lib/functions/card_namer.dart +++ b/lib/functions/card_namer.dart @@ -1,10 +1,34 @@ -/* -Create a function called CardNamer. -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 card) { + switch (card) { + case 1: + return 'Ace'; + 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 'Jack'; + case 12: + return 'Queen'; + case 13: + return 'King'; + default: + return card.toString(); + } } \ No newline at end of file diff --git a/lib/functions/check_if_busted.dart b/lib/functions/check_if_busted.dart index e8c1493..d57b3f4 100644 --- a/lib/functions/check_if_busted.dart +++ b/lib/functions/check_if_busted.dart @@ -20,5 +20,6 @@ Example inputs bool CheckIfBusted(List hand){ - + + return true; } diff --git a/lib/functions/check_winner.dart b/lib/functions/check_winner.dart index d01e38d..de375b0 100644 --- a/lib/functions/check_winner.dart +++ b/lib/functions/check_winner.dart @@ -16,5 +16,5 @@ 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){ - + return 0; } \ No newline at end of file diff --git a/lib/functions/deal_card.dart b/lib/functions/deal_card.dart index bb71c67..f5bfbd3 100644 --- a/lib/functions/deal_card.dart +++ b/lib/functions/deal_card.dart @@ -13,6 +13,10 @@ print(deck); // Should print [2, 3, 4] */ -int DealCard(List deck){ +import 'dart:math'; +int DealCard(List deck){ + final _random = new Random(); + var deltcard = deck[_random.nextInt(deck.length)]; + return deltcard; } \ No newline at end of file diff --git a/lib/functions/deck_of_cards.dart b/lib/functions/deck_of_cards.dart index 7aa5f80..d7b54af 100644 --- a/lib/functions/deck_of_cards.dart +++ b/lib/functions/deck_of_cards.dart @@ -9,7 +9,21 @@ Make this function return the List of integers. */ List DeckOfCards(){ + List cardvalue = [1,2,3,4,5,6,7,8,9,10,11,12,13]; + List deck = []; + + for (int i = 1; i <= cardvalue.length; i++) { + int count = 0; + int tempcard = i; + if (count <= 4) { + for (int i = 0; i < 4; i++) { + count++; + deck.add(tempcard); + } + }} + + return deck; + } -} diff --git a/lib/functions/draw_card.dart b/lib/functions/draw_card.dart index 472d6c4..c27f8e5 100644 --- a/lib/functions/draw_card.dart +++ b/lib/functions/draw_card.dart @@ -1,21 +1,18 @@ import 'deal_card.dart'; +import 'deck_of_cards.dart'; -/* -Create a function called DrawCard. This function should accept TWO lists -of integers as an input: hand, deck +void DrawCard(List hand, List deck) { + if (deck.isNotEmpty) { + hand.add(deck.removeAt(0)); + } +} -It should deal a card from the deck to the hand. +void main() { + List deck = [1, 2, 3, 4, 5, 6,7,8,9,10,11,12,13]; + List hand = []; -Example -List deck = [1, 2, 3, 4, 5, 6]; -List hand= []; -DrawCard(hand, deck ); + DrawCard(hand, deck); -print(deck); // Should print [2, 3, 4, 5, 6] -print(hand); // Should print [1] - - */ - -void DrawCard(List hand, List deck){ - -} \ No newline at end of file + print(deck); // Should print [2, 3, 4, 5, 6] + print(hand); // Should print [1] +} diff --git a/lib/functions/initial_deal.dart b/lib/functions/initial_deal.dart index b31c3ef..1537c2d 100644 --- a/lib/functions/initial_deal.dart +++ b/lib/functions/initial_deal.dart @@ -1,5 +1,15 @@ import 'draw_card.dart'; - +import 'card_namer.dart'; +import 'return_hand.dart'; +import 'shuffled_deck.dart'; +import 'shuffler.dart'; + +void initialDeal(List playerHand, List dealerHand, List deck) { + for (int i = 0; i < 2; i++) { + DrawCard(playerHand, deck); + DrawCard(dealerHand, deck); + } +} /* Create a function called InitialDeal. This function should accept THREE lists of integers as an input: playerHand, dealerHand, deck diff --git a/lib/functions/money_grab.dart b/lib/functions/money_grab.dart index 85f7ff3..43f4722 100644 --- a/lib/functions/money_grab.dart +++ b/lib/functions/money_grab.dart @@ -19,9 +19,9 @@ he doesn't input a integer? */ int PlaceBet(int bankRoll){ - + return 1; } int BuyIn(){ - + return 1; } \ No newline at end of file diff --git a/lib/functions/option_select.dart b/lib/functions/option_select.dart index a93f72c..e186a66 100644 --- a/lib/functions/option_select.dart +++ b/lib/functions/option_select.dart @@ -19,5 +19,5 @@ that the function will simply ask the user again to input an answer? */ int OptionSelect(String statement, List options){ - + return 0; } \ No newline at end of file diff --git a/lib/functions/return_hand.dart b/lib/functions/return_hand.dart index 8c9aabf..093efa3 100644 --- a/lib/functions/return_hand.dart +++ b/lib/functions/return_hand.dart @@ -1,4 +1,17 @@ -/* +import 'draw_card.dart'; +import 'card_namer.dart'; +import 'initial_deal.dart'; + + +void returnHand(List hand, List deck) { + deck.addAll(hand); + hand.clear(); +} + +void returnHands(List houseHand, List playerHand, List deck) { + returnHand(playerHand, deck); + returnHand(houseHand, deck); + /* Create a function that is capable of accepting two lists of integers, empty the content of one list to the end of the other list, call it ReturnHand. @@ -11,7 +24,7 @@ print(hand); // Should print [] */ - +} void ReturnHand(List hand, List deck){ } diff --git a/lib/functions/score_function.dart b/lib/functions/score_function.dart index 51820b5..7376331 100644 --- a/lib/functions/score_function.dart +++ b/lib/functions/score_function.dart @@ -1,3 +1,6 @@ +import 'draw_card.dart'; +import 'card_namer.dart'; +import 'initial_deal.dart'; /* Create a function called CalculateScore that can calculate the score of a given hand of cards. @@ -22,8 +25,26 @@ gets the score 1. So if the method gets the hand [1, 1] the score would be 12 */ - - int CalculateScore(List hand){ - + int score = 0; + bool aceused = false; + + for (int card in hand){ + if (card == 1) { + if (aceused == false) { + score += 11; + aceused = true; + } + else { + score += 1; + } + } + else if (card >= 11 && card <= 13) { + score += 10; + } + else { + score += card; + } + } + return score; } \ No newline at end of file diff --git a/lib/functions/shuffled_deck.dart b/lib/functions/shuffled_deck.dart index d100f4d..a243326 100644 --- a/lib/functions/shuffled_deck.dart +++ b/lib/functions/shuffled_deck.dart @@ -1,5 +1,6 @@ import 'shuffler.dart'; import 'deck_of_cards.dart'; + /* Create a function called ShuffledDeck that uses the methods from @@ -9,5 +10,6 @@ And when run, returns a shuffled deck of cards. No inputs, only output. */ List ShuffledDeck(){ - + + return []; } \ No newline at end of file diff --git a/lib/functions/shuffler.dart b/lib/functions/shuffler.dart index 2e980ac..d0f714f 100644 --- a/lib/functions/shuffler.dart +++ b/lib/functions/shuffler.dart @@ -1,12 +1,17 @@ import 'dart:math'; +import 'score_function.dart'; +import 'draw_card.dart'; +import 'card_namer.dart'; +import 'deck_of_cards.dart'; + +List shuffledDeck(deck) { + List suffleddeck = deck.shuffle(); + return suffleddeck; +} /* Create a function called Shuffler which takes a List of integer as an input and outputs a shuffled list of integers. I.e, it should return a RANDOMIZED version of the list. */ - -List Shuffler(List theList){ - -} \ No newline at end of file diff --git a/lib/functions/welcome.dart b/lib/functions/welcome.dart index 5478ebc..54400a7 100644 --- a/lib/functions/welcome.dart +++ b/lib/functions/welcome.dart @@ -9,5 +9,6 @@ that has no input and simply prints a text. */ void Welcome(){ - + print("Velkomin í Svörtu Perluna þar sem draumarnir rætast"); + print("Dragðu spil!"); } \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index 882993d..bc29fbf 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,344 +5,398 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: "45cfa8471b89fb6643fe9bf51bd7931a76b8f5ec2d65de4fb176dba8d4f22c77" + url: "https://pub.dev" source: hosted - version: "11.0.0" + version: "73.0.0" + _macros: + dependency: transitive + description: dart + source: sdk + version: "0.3.2" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.dartlang.org" + sha256: "4959fec185fe70cce007c57e9ab6983101dbe593d2bf8bbfb4453aaec0cf470a" + url: "https://pub.dev" source: hosted - version: "0.40.4" + version: "6.8.0" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 + url: "https://pub.dev" source: hosted - version: "1.6.0" + version: "2.6.0" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.12.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.3" - cli_util: - dependency: transitive - description: - name: cli_util - url: "https://pub.dartlang.org" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "2.1.2" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" source: hosted - version: "1.14.13" + version: "1.19.1" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "3.1.2" coverage: dependency: transitive description: name: coverage - url: "https://pub.dartlang.org" + sha256: "88b0fddbe4c92910fefc09cc0248f5e7f0cd23e450ded4c28f16ab8ee8f83268" + url: "https://pub.dev" source: hosted - version: "0.14.1" + version: "1.10.0" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" source: hosted - version: "2.1.5" - glob: + version: "3.0.6" + file: dependency: transitive description: - name: glob - url: "https://pub.dartlang.org" + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" source: hosted - version: "1.2.0" - http: + version: "7.0.1" + frontend_server_client: dependency: transitive description: - name: http - url: "https://pub.dartlang.org" + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" source: hosted - version: "0.12.2" + version: "4.0.0" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + 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: "2.2.0" + version: "3.2.1" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "76d306a1c3afb33fe82e2bbacad62a61f409b5634c915fceb0d799de1a913360" + url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "4.1.1" io: dependency: transitive description: name: io - url: "https://pub.dartlang.org" + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" source: hosted - version: "0.3.4" + version: "1.0.4" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + url: "https://pub.dev" source: hosted - version: "0.6.2" + version: "0.7.1" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" source: hosted - version: "0.11.4" + version: "1.3.0" + macros: + dependency: transitive + description: + name: macros + sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + url: "https://pub.dev" + source: hosted + version: "0.1.2-main.4" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" source: hosted - version: "0.12.9" + version: "0.12.16+1" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" source: hosted - version: "1.2.3" + version: "1.16.0" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" - source: hosted - version: "0.9.7" - node_interop: - dependency: transitive - description: - name: node_interop - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - node_io: - dependency: transitive - description: - name: node_io - url: "https://pub.dartlang.org" + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "2.0.0" node_preamble: dependency: transitive description: name: node_preamble - url: "https://pub.dartlang.org" + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" source: hosted - version: "1.4.12" + 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: "1.9.3" + version: "2.1.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" source: hosted - version: "1.7.0" + version: "1.9.1" pedantic: dependency: "direct dev" description: name: pedantic - url: "https://pub.dartlang.org" + sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" + url: "https://pub.dev" source: hosted - version: "1.9.2" + 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.4.0" + 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: "1.4.4" + version: "2.1.4" shelf: dependency: transitive description: name: shelf - url: "https://pub.dartlang.org" + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 + url: "https://pub.dev" source: hosted - version: "0.7.9" + version: "1.4.2" shelf_packages_handler: dependency: transitive description: name: shelf_packages_handler - url: "https://pub.dartlang.org" + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "3.0.2" shelf_static: dependency: transitive description: name: shelf_static - url: "https://pub.dartlang.org" + sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 + url: "https://pub.dev" source: hosted - version: "0.2.8" + version: "1.1.3" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.dartlang.org" + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" + url: "https://pub.dev" source: hosted - version: "0.2.3" + version: "2.0.0" source_map_stack_trace: dependency: transitive description: name: source_map_stack_trace - url: "https://pub.dartlang.org" + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.2" source_maps: dependency: transitive description: name: source_maps - url: "https://pub.dartlang.org" + sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + url: "https://pub.dev" source: hosted - version: "0.10.9" + 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.7.0" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" + url: "https://pub.dev" source: hosted - version: "1.9.5" + version: "1.12.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.2" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "0bd04f5bb74fcd6ff0606a888a30e917af9bd52820b178eaa464beb11dca84b6" + url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.4.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.1" test: dependency: "direct dev" description: name: test - url: "https://pub.dartlang.org" + sha256: "713a8789d62f3233c46b4a90b174737b2c04cb6ae4500f2aa8b1be8f03f5e67f" + url: "https://pub.dev" source: hosted - version: "1.15.4" + version: "1.25.8" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" + url: "https://pub.dev" source: hosted - version: "0.2.18" + version: "0.7.3" test_core: dependency: transitive description: name: test_core - url: "https://pub.dartlang.org" + sha256: "12391302411737c176b0b5d6491f466b0dd56d4763e347b6714efbaa74d7953d" + url: "https://pub.dev" source: hosted - version: "0.3.11+1" + version: "0.6.5" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.4.0" vm_service: dependency: transitive description: name: vm_service - url: "https://pub.dartlang.org" + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "14.3.1" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + url: "https://pub.dev" source: hosted - version: "0.9.7+15" + version: "1.1.0" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" + source: hosted + version: "0.1.6" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "3.0.1" webkit_inspection_protocol: dependency: transitive description: name: webkit_inspection_protocol - url: "https://pub.dartlang.org" + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" source: hosted - version: "0.7.3" + version: "1.2.1" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "3.1.2" sdks: - dart: ">=2.8.1 <3.0.0" + dart: ">=3.5.0 <=3.5.4" diff --git a/pubspec.yaml b/pubspec.yaml index d222501..0b0a39c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,13 +2,14 @@ name: BlackJack description: A sample command-line application. # version: 1.0.0 # homepage: https://www.example.com - + environment: - sdk: '>=2.8.1 <3.0.0' - + sdk: '>=3.0.1 <= 3.5.4' + #dependencies: # path: ^1.7.0 - + dev_dependencies: pedantic: ^1.9.0 test: ^1.14.4 + \ No newline at end of file diff --git a/test/BlackJack_test.dart b/test/BlackJack_test.dart index 5cac432..ed49495 100644 --- a/test/BlackJack_test.dart +++ b/test/BlackJack_test.dart @@ -1,8 +1,15 @@ -import 'package:BlackJack/BlackJack.dart'; +//import 'package:BlackJack/BlackJack.dart'; import 'package:test/test.dart'; +import 'package:BlackJack/functions/deck_of_cards.dart'; + void main() { + + List DeckOfCards(); + list shuffled = shuffle + /* test('calculate', () { expect(calculate(), 42); }); + */ }