From f4b08c9ac4a204cd2fe2727e9c1495753f962f75 Mon Sep 17 00:00:00 2001 From: hardardottir93 Date: Sat, 22 Mar 2025 10:20:46 +0000 Subject: [PATCH 01/22] works now --- .idea/libraries/Dart_SDK.xml | 44 ++--- lib/functions/card_namer.dart | 2 +- lib/functions/check_if_busted.dart | 2 +- lib/functions/check_winner.dart | 2 +- lib/functions/deal_card.dart | 2 +- lib/functions/deck_of_cards.dart | 2 +- lib/functions/money_grab.dart | 4 +- lib/functions/option_select.dart | 2 +- lib/functions/score_function.dart | 2 +- lib/functions/shuffled_deck.dart | 2 +- lib/functions/shuffler.dart | 2 +- pubspec.lock | 287 ++++++++++++++++------------- pubspec.yaml | 2 +- 13 files changed, 199 insertions(+), 156 deletions(-) diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml index d59798d..5ade041 100644 --- a/.idea/libraries/Dart_SDK.xml +++ b/.idea/libraries/Dart_SDK.xml @@ -1,27 +1,29 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/functions/card_namer.dart b/lib/functions/card_namer.dart index 1cfc4d3..5c4a9cb 100644 --- a/lib/functions/card_namer.dart +++ b/lib/functions/card_namer.dart @@ -6,5 +6,5 @@ it should return the name of the corresponding card (Ignore the suit) */ String CardNamer(int i){ - +return ""; } \ No newline at end of file diff --git a/lib/functions/check_if_busted.dart b/lib/functions/check_if_busted.dart index e8c1493..b2ad0b5 100644 --- a/lib/functions/check_if_busted.dart +++ b/lib/functions/check_if_busted.dart @@ -20,5 +20,5 @@ Example inputs bool CheckIfBusted(List hand){ - +return false; } diff --git a/lib/functions/check_winner.dart b/lib/functions/check_winner.dart index d01e38d..09f7785 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..121f594 100644 --- a/lib/functions/deal_card.dart +++ b/lib/functions/deal_card.dart @@ -14,5 +14,5 @@ print(deck); // Should print [2, 3, 4] int DealCard(List deck){ - +return 0; } \ No newline at end of file diff --git a/lib/functions/deck_of_cards.dart b/lib/functions/deck_of_cards.dart index 7aa5f80..f2896c9 100644 --- a/lib/functions/deck_of_cards.dart +++ b/lib/functions/deck_of_cards.dart @@ -9,7 +9,7 @@ Make this function return the List of integers. */ List DeckOfCards(){ - +return []; } diff --git a/lib/functions/money_grab.dart b/lib/functions/money_grab.dart index 85f7ff3..71522b5 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 0; } int BuyIn(){ - +return 0; } \ No newline at end of file diff --git a/lib/functions/option_select.dart b/lib/functions/option_select.dart index a93f72c..9c1e216 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/score_function.dart b/lib/functions/score_function.dart index 51820b5..22a106f 100644 --- a/lib/functions/score_function.dart +++ b/lib/functions/score_function.dart @@ -25,5 +25,5 @@ gets the score 1. So if the method gets the hand [1, 1] the score would be 12 int CalculateScore(List hand){ - +return 0; } \ No newline at end of file diff --git a/lib/functions/shuffled_deck.dart b/lib/functions/shuffled_deck.dart index d100f4d..e87dbd3 100644 --- a/lib/functions/shuffled_deck.dart +++ b/lib/functions/shuffled_deck.dart @@ -9,5 +9,5 @@ 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..58a3605 100644 --- a/lib/functions/shuffler.dart +++ b/lib/functions/shuffler.dart @@ -8,5 +8,5 @@ I.e, it should return a RANDOMIZED version of the list. */ List Shuffler(List theList){ - +return []; } \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index 882993d..2cfd261 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,344 +5,385 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: dc27559385e905ad30838356c5f5d574014ba39872d732111cd07ac0beff4c57 + url: "https://pub.dev" source: hosted - version: "11.0.0" + version: "80.0.0" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.dartlang.org" + sha256: "192d1c5b944e7e53b24b5586db760db934b177d4147c42fbca8c8c5f1eb8d11e" + url: "https://pub.dev" source: hosted - version: "0.40.4" + version: "7.3.0" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" source: hosted - version: "1.6.0" + version: "2.7.0" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" + url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.13.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" 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" - 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: e3493833ea012784c740e341952298f1cc77f1f01b1bbc3eb4eecf6984fb7f43 + url: "https://pub.dev" source: hosted - version: "0.14.1" + version: "1.11.1" 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: "7.0.1" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" source: hosted - version: "1.2.0" - http: + version: "4.0.0" + glob: dependency: transitive description: - name: http - url: "https://pub.dartlang.org" + name: glob + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de + url: "https://pub.dev" source: hosted - version: "0.12.2" + version: "2.1.3" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.dartlang.org" + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 + url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "3.2.2" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "4.1.2" io: dependency: transitive description: name: io - url: "https://pub.dartlang.org" + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b + url: "https://pub.dev" source: hosted - version: "0.3.4" + version: "1.0.5" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc" + url: "https://pub.dev" source: hosted - version: "0.6.2" + version: "0.7.2" 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" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" source: hosted - version: "0.12.9" + version: "0.12.17" 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" + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.dev" 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" - 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: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc + url: "https://pub.dev" source: hosted - version: "1.9.3" + version: "2.2.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: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" + url: "https://pub.dev" source: hosted - version: "1.4.4" + version: "2.2.0" 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: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925" + url: "https://pub.dev" source: hosted - version: "0.2.3" + version: "3.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: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812" + url: "https://pub.dev" source: hosted - version: "0.10.9" + version: "0.10.13" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" source: hosted - version: "1.7.0" + version: "1.10.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" source: hosted - version: "1.9.5" + version: "1.12.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.4" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.4.1" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.2" test: dependency: "direct dev" description: name: test - url: "https://pub.dartlang.org" + sha256: "301b213cd241ca982e9ba50266bd3f5bd1ea33f1455554c5abb85d1be0e2d87e" + url: "https://pub.dev" source: hosted - version: "1.15.4" + version: "1.25.15" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" source: hosted - version: "0.2.18" + version: "0.7.4" test_core: dependency: transitive description: name: test_core - url: "https://pub.dartlang.org" + sha256: "84d17c3486c8dfdbe5e12a50c8ae176d15e2a771b96909a9442b40173649ccaa" + url: "https://pub.dev" source: hosted - version: "0.3.11+1" + version: "0.6.8" 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: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 + url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "15.0.0" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" source: hosted - version: "0.9.7+15" + version: "0.1.6" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" + sha256: "0b8e2457400d8a859b7b2030786835a28a8e80836ef64402abef392ff4f1d0e5" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "3.0.2" 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: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "3.1.3" sdks: - dart: ">=2.8.1 <3.0.0" + dart: ">=3.7.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index d222501..b78ee2e 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.8.1 <3.0.0' + sdk: ^3.7.0 #dependencies: # path: ^1.7.0 From 7797c7644e2133adb6bbaf8f0214797cb00bb396 Mon Sep 17 00:00:00 2001 From: atligudna Date: Sat, 22 Mar 2025 10:40:20 +0000 Subject: [PATCH 02/22] Deck of Cars Deck of Cards --- .dart_tool/package_config.json | 303 +++++++++++++++++++++++++++++++ bin/BlackJack.dart | 2 +- lib/functions/deck_of_cards.dart | 17 +- 3 files changed, 320 insertions(+), 2 deletions(-) create mode 100644 .dart_tool/package_config.json diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json new file mode 100644 index 0000000..cd4e47d --- /dev/null +++ b/.dart_tool/package_config.json @@ -0,0 +1,303 @@ +{ + "configVersion": 2, + "packages": [ + { + "name": "_fe_analyzer_shared", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/_fe_analyzer_shared-80.0.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "analyzer", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/analyzer-7.3.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "args", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/args-2.7.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "async", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/async-2.13.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "boolean_selector", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/boolean_selector-2.1.2", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "collection", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/collection-1.19.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "convert", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/convert-3.1.2", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "coverage", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/coverage-1.11.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "crypto", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/crypto-3.0.6", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "file", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/file-7.0.1", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "frontend_server_client", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/frontend_server_client-4.0.0", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "glob", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/glob-2.1.3", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "http_multi_server", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/http_multi_server-3.2.2", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "http_parser", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/http_parser-4.1.2", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "io", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/io-1.0.5", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "js", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/js-0.7.2", + "packageUri": "lib/", + "languageVersion": "3.7" + }, + { + "name": "logging", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/logging-1.3.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "matcher", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/matcher-0.12.17", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "meta", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/meta-1.16.0", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "mime", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/mime-2.0.0", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "node_preamble", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/node_preamble-2.0.2", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "package_config", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/package_config-2.2.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "path", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/path-1.9.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "pedantic", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/pedantic-1.11.1", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "pool", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/pool-1.5.1", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "pub_semver", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/pub_semver-2.2.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "shelf", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/shelf-1.4.2", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "shelf_packages_handler", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/shelf_packages_handler-3.0.2", + "packageUri": "lib/", + "languageVersion": "2.17" + }, + { + "name": "shelf_static", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/shelf_static-1.1.3", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "shelf_web_socket", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/shelf_web_socket-3.0.0", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "source_map_stack_trace", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/source_map_stack_trace-2.1.2", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "source_maps", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/source_maps-0.10.13", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "source_span", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/source_span-1.10.1", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "stack_trace", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/stack_trace-1.12.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "stream_channel", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/stream_channel-2.1.4", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "string_scanner", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/string_scanner-1.4.1", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "term_glyph", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/term_glyph-1.2.2", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "test", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/test-1.25.15", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "test_api", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/test_api-0.7.4", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "test_core", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/test_core-0.6.8", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "typed_data", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/typed_data-1.4.0", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "vm_service", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/vm_service-15.0.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "watcher", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/watcher-1.1.1", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "web", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/web-1.1.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "web_socket", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/web_socket-0.1.6", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "web_socket_channel", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/web_socket_channel-3.0.2", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "webkit_inspection_protocol", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/webkit_inspection_protocol-1.2.1", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "yaml", + "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/yaml-3.1.3", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "BlackJack", + "rootUri": "../", + "packageUri": "lib/", + "languageVersion": "3.7" + } + ], + "generated": "2025-03-22T10:38:55.638199Z", + "generator": "pub", + "generatorVersion": "3.7.0", + "pubCache": "file:///Users/atlig/.pub-cache" +} diff --git a/bin/BlackJack.dart b/bin/BlackJack.dart index b1e9a3d..dfc1d3c 100644 --- a/bin/BlackJack.dart +++ b/bin/BlackJack.dart @@ -6,5 +6,5 @@ import 'package:BlackJack/lib.dart'; */ void main() { - + print(DeckOfCards()); } diff --git a/lib/functions/deck_of_cards.dart b/lib/functions/deck_of_cards.dart index f2896c9..412bc0d 100644 --- a/lib/functions/deck_of_cards.dart +++ b/lib/functions/deck_of_cards.dart @@ -9,7 +9,22 @@ Make this function return the List of integers. */ List DeckOfCards(){ -return []; + List myDeck = [ + 1,1,1,1, + 13,13,13,13, + 12,12,12,12, + 11,11,11,11, + 10,10,10,10, + 9,9,9,9, + 8,8,8,8, + 7,7,7,7, + 6,6,6,6, + 5,5,5,5, + 4,4,4,4, + 3,3,3,3, + 2,2,2,2, + ]; +return myDeck; } From b94efc671dcb8a34bbb726a706feedfd42ba8548 Mon Sep 17 00:00:00 2001 From: Heiddi187 Date: Sat, 22 Mar 2025 10:40:46 +0000 Subject: [PATCH 03/22] welcome welcome --- .dart_tool/package_config.json | 303 +++++++++++++++++++++++++++++++++ bin/BlackJack.dart | 3 +- lib/functions/welcome.dart | 3 +- 3 files changed, 307 insertions(+), 2 deletions(-) create mode 100644 .dart_tool/package_config.json diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json new file mode 100644 index 0000000..bab4383 --- /dev/null +++ b/.dart_tool/package_config.json @@ -0,0 +1,303 @@ +{ + "configVersion": 2, + "packages": [ + { + "name": "_fe_analyzer_shared", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/_fe_analyzer_shared-80.0.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "analyzer", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/analyzer-7.3.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "args", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/args-2.7.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "async", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/async-2.13.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "boolean_selector", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/boolean_selector-2.1.2", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "collection", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "convert", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/convert-3.1.2", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "coverage", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/coverage-1.11.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "crypto", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/crypto-3.0.6", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "file", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/file-7.0.1", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "frontend_server_client", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/frontend_server_client-4.0.0", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "glob", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/glob-2.1.3", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "http_multi_server", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/http_multi_server-3.2.2", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "http_parser", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/http_parser-4.1.2", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "io", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/io-1.0.5", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "js", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/js-0.7.2", + "packageUri": "lib/", + "languageVersion": "3.7" + }, + { + "name": "logging", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/logging-1.3.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "matcher", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/matcher-0.12.17", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "meta", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/meta-1.16.0", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "mime", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/mime-2.0.0", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "node_preamble", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/node_preamble-2.0.2", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "package_config", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/package_config-2.2.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "path", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/path-1.9.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "pedantic", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/pedantic-1.11.1", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "pool", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/pool-1.5.1", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "pub_semver", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/pub_semver-2.2.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "shelf", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/shelf-1.4.2", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "shelf_packages_handler", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/shelf_packages_handler-3.0.2", + "packageUri": "lib/", + "languageVersion": "2.17" + }, + { + "name": "shelf_static", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/shelf_static-1.1.3", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "shelf_web_socket", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/shelf_web_socket-3.0.0", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "source_map_stack_trace", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/source_map_stack_trace-2.1.2", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "source_maps", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/source_maps-0.10.13", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "source_span", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/source_span-1.10.1", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "stack_trace", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/stack_trace-1.12.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "stream_channel", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/stream_channel-2.1.4", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "string_scanner", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/string_scanner-1.4.1", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "term_glyph", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/term_glyph-1.2.2", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "test", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/test-1.25.15", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "test_api", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.7.4", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "test_core", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/test_core-0.6.8", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "typed_data", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/typed_data-1.4.0", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "vm_service", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/vm_service-15.0.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "watcher", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/watcher-1.1.1", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "web", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/web-1.1.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "web_socket", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/web_socket-0.1.6", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "web_socket_channel", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/web_socket_channel-3.0.2", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "webkit_inspection_protocol", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/webkit_inspection_protocol-1.2.1", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "yaml", + "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/yaml-3.1.3", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "BlackJack", + "rootUri": "../", + "packageUri": "lib/", + "languageVersion": "3.7" + } + ], + "generated": "2025-03-22T10:28:17.154311Z", + "generator": "pub", + "generatorVersion": "3.7.0", + "pubCache": "file:///C:/Users/heidd/AppData/Local/Pub/Cache" +} diff --git a/bin/BlackJack.dart b/bin/BlackJack.dart index b1e9a3d..bb351aa 100644 --- a/bin/BlackJack.dart +++ b/bin/BlackJack.dart @@ -1,10 +1,11 @@ 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/welcome.dart b/lib/functions/welcome.dart index 5478ebc..152654d 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("... Welcome to this BlackJack game ..."); + print("Get ready to lose all your money's!!!!"); } \ No newline at end of file From a2833e51e68359a97ceddd9d6a8e774d3629b05f Mon Sep 17 00:00:00 2001 From: hardardottir93 Date: Sat, 22 Mar 2025 10:46:41 +0000 Subject: [PATCH 04/22] Create package_config.json --- .dart_tool/package_config.json | 303 +++++++++++++++++++++++++++++++++ 1 file changed, 303 insertions(+) create mode 100644 .dart_tool/package_config.json diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json new file mode 100644 index 0000000..a2b9f32 --- /dev/null +++ b/.dart_tool/package_config.json @@ -0,0 +1,303 @@ +{ + "configVersion": 2, + "packages": [ + { + "name": "_fe_analyzer_shared", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/_fe_analyzer_shared-80.0.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "analyzer", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/analyzer-7.3.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "args", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/args-2.7.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "async", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/async-2.13.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "boolean_selector", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/boolean_selector-2.1.2", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "collection", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "convert", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/convert-3.1.2", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "coverage", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/coverage-1.11.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "crypto", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/crypto-3.0.6", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "file", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/file-7.0.1", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "frontend_server_client", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/frontend_server_client-4.0.0", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "glob", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/glob-2.1.3", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "http_multi_server", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/http_multi_server-3.2.2", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "http_parser", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/http_parser-4.1.2", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "io", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/io-1.0.5", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "js", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/js-0.7.2", + "packageUri": "lib/", + "languageVersion": "3.7" + }, + { + "name": "logging", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/logging-1.3.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "matcher", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/matcher-0.12.17", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "meta", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/meta-1.16.0", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "mime", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/mime-2.0.0", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "node_preamble", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/node_preamble-2.0.2", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "package_config", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/package_config-2.2.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "path", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/path-1.9.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "pedantic", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/pedantic-1.11.1", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "pool", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/pool-1.5.1", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "pub_semver", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/pub_semver-2.2.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "shelf", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/shelf-1.4.2", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "shelf_packages_handler", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/shelf_packages_handler-3.0.2", + "packageUri": "lib/", + "languageVersion": "2.17" + }, + { + "name": "shelf_static", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/shelf_static-1.1.3", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "shelf_web_socket", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/shelf_web_socket-3.0.0", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "source_map_stack_trace", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/source_map_stack_trace-2.1.2", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "source_maps", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/source_maps-0.10.13", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "source_span", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/source_span-1.10.1", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "stack_trace", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/stack_trace-1.12.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "stream_channel", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/stream_channel-2.1.4", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "string_scanner", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/string_scanner-1.4.1", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "term_glyph", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/term_glyph-1.2.2", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "test", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/test-1.25.15", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "test_api", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.7.4", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "test_core", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/test_core-0.6.8", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "typed_data", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/typed_data-1.4.0", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "vm_service", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/vm_service-15.0.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "watcher", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/watcher-1.1.1", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "web", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/web-1.1.1", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "web_socket", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/web_socket-0.1.6", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "web_socket_channel", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/web_socket_channel-3.0.2", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "webkit_inspection_protocol", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/webkit_inspection_protocol-1.2.1", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "yaml", + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/yaml-3.1.3", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "BlackJack", + "rootUri": "../", + "packageUri": "lib/", + "languageVersion": "3.7" + } + ], + "generated": "2025-03-22T10:18:43.598958Z", + "generator": "pub", + "generatorVersion": "3.7.0", + "pubCache": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache" +} From 1b74fc377796ffe2beccef767d85e38aade7f3bd Mon Sep 17 00:00:00 2001 From: Heiddi187 Date: Sat, 22 Mar 2025 10:46:42 +0000 Subject: [PATCH 05/22] wwelcome welcome --- bin/BlackJack.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/BlackJack.dart b/bin/BlackJack.dart index bb351aa..def92e1 100644 --- a/bin/BlackJack.dart +++ b/bin/BlackJack.dart @@ -7,5 +7,9 @@ import 'package:BlackJack/lib.dart'; */ void main() { +<<<<<<< HEAD Welcome(); +======= + print(DeckOfCards()); +>>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 } From c433ebb086897e5030ad6ef86f19077fbf488746 Mon Sep 17 00:00:00 2001 From: hardardottir93 Date: Sat, 22 Mar 2025 10:53:33 +0000 Subject: [PATCH 06/22] update --- bin/BlackJack.dart | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bin/BlackJack.dart b/bin/BlackJack.dart index def92e1..bb351aa 100644 --- a/bin/BlackJack.dart +++ b/bin/BlackJack.dart @@ -7,9 +7,5 @@ import 'package:BlackJack/lib.dart'; */ void main() { -<<<<<<< HEAD Welcome(); -======= - print(DeckOfCards()); ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 } From 1d31b62f8c6e1b1a8a15e0f595cc996453c48db6 Mon Sep 17 00:00:00 2001 From: hardardottir93 Date: Sat, 22 Mar 2025 10:55:54 +0000 Subject: [PATCH 07/22] works now --- .dart_tool/package_config.json | 299 ++++++--------------------------- 1 file changed, 50 insertions(+), 249 deletions(-) diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json index 18dcfb8..1f2398c 100644 --- a/.dart_tool/package_config.json +++ b/.dart_tool/package_config.json @@ -3,481 +3,289 @@ "packages": [ { "name": "_fe_analyzer_shared", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/_fe_analyzer_shared-80.0.0", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/_fe_analyzer_shared-80.0.0", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/_fe_analyzer_shared-80.0.0", "packageUri": "lib/", "languageVersion": "3.3" }, { "name": "analyzer", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/analyzer-7.3.0", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/analyzer-7.3.0", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/analyzer-7.3.0", "packageUri": "lib/", "languageVersion": "3.3" }, { "name": "args", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/args-2.7.0", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/args-2.7.0", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/args-2.7.0", "packageUri": "lib/", "languageVersion": "3.3" }, { "name": "async", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/async-2.13.0", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/async-2.13.0", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/async-2.13.0", "packageUri": "lib/", "languageVersion": "3.4" }, { "name": "boolean_selector", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/boolean_selector-2.1.2", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/boolean_selector-2.1.2", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/boolean_selector-2.1.2", "packageUri": "lib/", "languageVersion": "3.1" }, { "name": "collection", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.1", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/collection-1.19.1", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.1", "packageUri": "lib/", "languageVersion": "3.4" }, { "name": "convert", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/convert-3.1.2", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/convert-3.1.2", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/convert-3.1.2", "packageUri": "lib/", "languageVersion": "3.4" }, { "name": "coverage", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/coverage-1.11.1", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/coverage-1.11.1", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/coverage-1.11.1", "packageUri": "lib/", "languageVersion": "3.4" }, { "name": "crypto", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/crypto-3.0.6", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/crypto-3.0.6", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/crypto-3.0.6", "packageUri": "lib/", "languageVersion": "3.4" }, { "name": "file", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/file-7.0.1", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/file-7.0.1", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/file-7.0.1", "packageUri": "lib/", "languageVersion": "3.0" }, { "name": "frontend_server_client", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/frontend_server_client-4.0.0", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/frontend_server_client-4.0.0", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/frontend_server_client-4.0.0", "packageUri": "lib/", "languageVersion": "3.0" }, { "name": "glob", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/glob-2.1.3", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/glob-2.1.3", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/glob-2.1.3", "packageUri": "lib/", "languageVersion": "3.3" }, { "name": "http_multi_server", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/http_multi_server-3.2.2", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/http_multi_server-3.2.2", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/http_multi_server-3.2.2", "packageUri": "lib/", "languageVersion": "3.2" }, { "name": "http_parser", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/http_parser-4.1.2", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/http_parser-4.1.2", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/http_parser-4.1.2", "packageUri": "lib/", "languageVersion": "3.4" }, { "name": "io", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/io-1.0.5", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/io-1.0.5", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/io-1.0.5", "packageUri": "lib/", "languageVersion": "3.4" }, { "name": "js", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/js-0.7.2", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/js-0.7.2", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/js-0.7.2", "packageUri": "lib/", "languageVersion": "3.7" }, { "name": "logging", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/logging-1.3.0", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/logging-1.3.0", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/logging-1.3.0", "packageUri": "lib/", "languageVersion": "3.4" }, { "name": "matcher", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/matcher-0.12.17", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/matcher-0.12.17", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/matcher-0.12.17", "packageUri": "lib/", "languageVersion": "3.4" }, { "name": "meta", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/meta-1.16.0", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/meta-1.16.0", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/meta-1.16.0", "packageUri": "lib/", "languageVersion": "2.12" }, { "name": "mime", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/mime-2.0.0", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/mime-2.0.0", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/mime-2.0.0", "packageUri": "lib/", "languageVersion": "3.2" }, { "name": "node_preamble", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/node_preamble-2.0.2", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/node_preamble-2.0.2", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/node_preamble-2.0.2", "packageUri": "lib/", "languageVersion": "2.12" }, { "name": "package_config", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/package_config-2.2.0", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/package_config-2.2.0", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/package_config-2.2.0", "packageUri": "lib/", "languageVersion": "3.4" }, { "name": "path", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/path-1.9.1", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/path-1.9.1", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/path-1.9.1", "packageUri": "lib/", "languageVersion": "3.4" }, { "name": "pedantic", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/pedantic-1.11.1", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/pedantic-1.11.1", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/pedantic-1.11.1", "packageUri": "lib/", "languageVersion": "2.12" }, { "name": "pool", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/pool-1.5.1", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/pool-1.5.1", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/pool-1.5.1", "packageUri": "lib/", "languageVersion": "2.12" }, { "name": "pub_semver", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/pub_semver-2.2.0", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/pub_semver-2.2.0", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/pub_semver-2.2.0", "packageUri": "lib/", "languageVersion": "3.4" }, { "name": "shelf", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/shelf-1.4.2", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/shelf-1.4.2", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/shelf-1.4.2", "packageUri": "lib/", "languageVersion": "3.4" }, { "name": "shelf_packages_handler", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/shelf_packages_handler-3.0.2", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/shelf_packages_handler-3.0.2", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/shelf_packages_handler-3.0.2", "packageUri": "lib/", "languageVersion": "2.17" }, { "name": "shelf_static", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/shelf_static-1.1.3", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/shelf_static-1.1.3", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/shelf_static-1.1.3", "packageUri": "lib/", "languageVersion": "3.3" }, { "name": "shelf_web_socket", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/shelf_web_socket-3.0.0", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/shelf_web_socket-3.0.0", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/shelf_web_socket-3.0.0", "packageUri": "lib/", "languageVersion": "3.5" }, { "name": "source_map_stack_trace", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/source_map_stack_trace-2.1.2", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/source_map_stack_trace-2.1.2", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/source_map_stack_trace-2.1.2", "packageUri": "lib/", "languageVersion": "3.3" }, { "name": "source_maps", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/source_maps-0.10.13", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/source_maps-0.10.13", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/source_maps-0.10.13", "packageUri": "lib/", "languageVersion": "3.3" }, { "name": "source_span", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/source_span-1.10.1", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/source_span-1.10.1", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/source_span-1.10.1", "packageUri": "lib/", "languageVersion": "3.1" }, { "name": "stack_trace", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/stack_trace-1.12.1", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/stack_trace-1.12.1", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/stack_trace-1.12.1", "packageUri": "lib/", "languageVersion": "3.4" }, { "name": "stream_channel", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/stream_channel-2.1.4", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/stream_channel-2.1.4", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/stream_channel-2.1.4", "packageUri": "lib/", "languageVersion": "3.3" }, { "name": "string_scanner", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/string_scanner-1.4.1", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/string_scanner-1.4.1", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/string_scanner-1.4.1", "packageUri": "lib/", "languageVersion": "3.1" }, { "name": "term_glyph", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/term_glyph-1.2.2", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/term_glyph-1.2.2", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/term_glyph-1.2.2", "packageUri": "lib/", "languageVersion": "3.1" }, { "name": "test", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/test-1.25.15", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/test-1.25.15", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/test-1.25.15", "packageUri": "lib/", "languageVersion": "3.5" }, { "name": "test_api", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.7.4", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/test_api-0.7.4", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/test_api-0.7.4", "packageUri": "lib/", "languageVersion": "3.5" }, { "name": "test_core", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/test_core-0.6.8", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/test_core-0.6.8", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/test_core-0.6.8", "packageUri": "lib/", "languageVersion": "3.5" }, { "name": "typed_data", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/typed_data-1.4.0", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/typed_data-1.4.0", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/typed_data-1.4.0", "packageUri": "lib/", "languageVersion": "3.5" }, { "name": "vm_service", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/vm_service-15.0.0", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/vm_service-15.0.0", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/vm_service-15.0.0", "packageUri": "lib/", "languageVersion": "3.3" }, { "name": "watcher", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/watcher-1.1.1", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/watcher-1.1.1", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/watcher-1.1.1", "packageUri": "lib/", "languageVersion": "3.1" }, { "name": "web", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/web-1.1.1", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/web-1.1.1", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/web-1.1.1", "packageUri": "lib/", "languageVersion": "3.4" }, { "name": "web_socket", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/web_socket-0.1.6", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/web_socket-0.1.6", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/web_socket-0.1.6", "packageUri": "lib/", "languageVersion": "3.3" }, { "name": "web_socket_channel", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/web_socket_channel-3.0.2", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/web_socket_channel-3.0.2", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/web_socket_channel-3.0.2", "packageUri": "lib/", "languageVersion": "3.3" }, { "name": "webkit_inspection_protocol", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/webkit_inspection_protocol-1.2.1", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/webkit_inspection_protocol-1.2.1", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/webkit_inspection_protocol-1.2.1", "packageUri": "lib/", "languageVersion": "3.0" }, { "name": "yaml", -<<<<<<< HEAD - "rootUri": "file:///C:/Users/heidd/AppData/Local/Pub/Cache/hosted/pub.dev/yaml-3.1.3", -======= - "rootUri": "file:///Users/atlig/.pub-cache/hosted/pub.dev/yaml-3.1.3", ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "rootUri": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache/hosted/pub.dev/yaml-3.1.3", "packageUri": "lib/", "languageVersion": "3.4" }, @@ -488,15 +296,8 @@ "languageVersion": "3.7" } ], -<<<<<<< HEAD - "generated": "2025-03-22T10:28:17.154311Z", + "generated": "2025-03-22T10:55:21.067701Z", "generator": "pub", "generatorVersion": "3.7.0", - "pubCache": "file:///C:/Users/heidd/AppData/Local/Pub/Cache" -======= - "generated": "2025-03-22T10:38:55.638199Z", - "generator": "pub", - "generatorVersion": "3.7.0", - "pubCache": "file:///Users/atlig/.pub-cache" ->>>>>>> 7797c7644e2133adb6bbaf8f0214797cb00bb396 + "pubCache": "file:///C:/Users/ori.hafrunh/AppData/Local/Pub/Cache" } From efc3d1aa3deb5623b966193fe7818d75002fb4c7 Mon Sep 17 00:00:00 2001 From: JonGunnar04 Date: Sat, 22 Mar 2025 11:01:03 +0000 Subject: [PATCH 08/22] Card namer --- .idea/libraries/Dart_SDK.xml | 46 +++++++++++++++++------------------ lib/functions/card_namer.dart | 16 +++++++++--- 2 files changed, 36 insertions(+), 26 deletions(-) diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml index 5ade041..1e467b3 100644 --- a/.idea/libraries/Dart_SDK.xml +++ b/.idea/libraries/Dart_SDK.xml @@ -1,29 +1,29 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/functions/card_namer.dart b/lib/functions/card_namer.dart index 5c4a9cb..d9e059e 100644 --- a/lib/functions/card_namer.dart +++ b/lib/functions/card_namer.dart @@ -5,6 +5,16 @@ When given an integer between 1-13, it should return the name of the corresponding card (Ignore the suit) */ -String CardNamer(int i){ -return ""; -} \ No newline at end of file +String CardNamer(int i) { + if (i == 1) { + return "Ás"; + } else if (i == 11) { + return 'Gosi'; + } else if (i == 12) { + return 'Drottning'; + } else if (i == 13) { + return 'Kóngur'; + } else { + return i.toString(); + } +} From 40ec5c4825a25eb8125fb907fdcba6c95f640268 Mon Sep 17 00:00:00 2001 From: JonGunnar04 Date: Sat, 22 Mar 2025 11:06:23 +0000 Subject: [PATCH 09/22] Card namer finished --- lib/functions/card_namer.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions/card_namer.dart b/lib/functions/card_namer.dart index d9e059e..9c93b32 100644 --- a/lib/functions/card_namer.dart +++ b/lib/functions/card_namer.dart @@ -17,4 +17,4 @@ String CardNamer(int i) { } else { return i.toString(); } -} +} \ No newline at end of file From acaddc37d216202d5452e6cc74a03d6f82ff8832 Mon Sep 17 00:00:00 2001 From: atligudna Date: Sat, 22 Mar 2025 11:15:03 +0000 Subject: [PATCH 10/22] Shuffled cards Here are the cards shuffled --- lib/functions/shuffler.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/functions/shuffler.dart b/lib/functions/shuffler.dart index 58a3605..c50feb5 100644 --- a/lib/functions/shuffler.dart +++ b/lib/functions/shuffler.dart @@ -7,6 +7,7 @@ and outputs a shuffled list of integers. I.e, it should return a RANDOMIZED version of the list. */ -List Shuffler(List theList){ -return []; +List Shuffler(List theList) { + theList.shuffle(); + return theList; } \ No newline at end of file From d448b72cc4a12cb1cc94d17de5054d17862427b3 Mon Sep 17 00:00:00 2001 From: hardardottir93 Date: Sat, 22 Mar 2025 11:17:21 +0000 Subject: [PATCH 11/22] works now --- lib/functions/score_function.dart | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/functions/score_function.dart b/lib/functions/score_function.dart index 22a106f..c102726 100644 --- a/lib/functions/score_function.dart +++ b/lib/functions/score_function.dart @@ -25,5 +25,25 @@ gets the score 1. So if the method gets the hand [1, 1] the score would be 12 int CalculateScore(List hand){ -return 0; + var card1 = hand[0]; + var card2 = hand[1]; + var score = 0; + + if(card1 > 1 && card1 <= 10) { + score = score + card1; + } else if(card1 == 1) { + score = score+11; + } else if(card1 >= 11 && card1 <= 13 ) { + score = score+10; + } + + if(card2 > 1 && card2 <= 10) { + score = score + card1; + } else if(card2 == 1) { + score = score+1; + } else if(card2 >= 11 && card2 <= 13 ) { + score = score+10; + } + + return score; } \ No newline at end of file From 3d6f3051c6f21c7caf453a07ce62ec764629c022 Mon Sep 17 00:00:00 2001 From: Haukur81 Date: Sat, 22 Mar 2025 11:21:09 +0000 Subject: [PATCH 12/22] Update draw_card.dart --- lib/functions/draw_card.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/functions/draw_card.dart b/lib/functions/draw_card.dart index 472d6c4..4ff7a95 100644 --- a/lib/functions/draw_card.dart +++ b/lib/functions/draw_card.dart @@ -18,4 +18,6 @@ print(hand); // Should print [1] void DrawCard(List hand, List deck){ + dfdf + } \ No newline at end of file From 30bb59839c3ae984cbfe48da64cf4c15dfea70fa Mon Sep 17 00:00:00 2001 From: Haukur81 Date: Sat, 22 Mar 2025 11:25:39 +0000 Subject: [PATCH 13/22] Update draw_card.dart --- lib/functions/draw_card.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/functions/draw_card.dart b/lib/functions/draw_card.dart index 4ff7a95..63a5adf 100644 --- a/lib/functions/draw_card.dart +++ b/lib/functions/draw_card.dart @@ -17,7 +17,6 @@ print(hand); // Should print [1] */ void DrawCard(List hand, List deck){ - - dfdf + } \ No newline at end of file From 45a9de6c25dc921be3526dd3fc2593abfa08c433 Mon Sep 17 00:00:00 2001 From: Haukur81 Date: Sat, 22 Mar 2025 11:36:25 +0000 Subject: [PATCH 14/22] 1 --- .idea/libraries/Dart_SDK.xml | 46 ++++++++++++++++++------------------ lib/functions/draw_card.dart | 8 ++++++- 2 files changed, 30 insertions(+), 24 deletions(-) diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml index 1e467b3..8fbdc2a 100644 --- a/.idea/libraries/Dart_SDK.xml +++ b/.idea/libraries/Dart_SDK.xml @@ -1,29 +1,29 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/functions/draw_card.dart b/lib/functions/draw_card.dart index 63a5adf..4bc05ca 100644 --- a/lib/functions/draw_card.dart +++ b/lib/functions/draw_card.dart @@ -17,6 +17,12 @@ print(hand); // Should print [1] */ void DrawCard(List hand, List deck){ - + if (deck.isNotEmpty) { + // Take the first card from the deck + int card = deck.removeAt(0); + + // Add the card to the hand + hand.add(card); + } } \ No newline at end of file From c2bc271f87735b31ddd24f75fe036160e319e363 Mon Sep 17 00:00:00 2001 From: hardardottir93 Date: Sat, 22 Mar 2025 11:50:54 +0000 Subject: [PATCH 15/22] works now --- lib/functions/score_function.dart | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/functions/score_function.dart b/lib/functions/score_function.dart index c102726..6cc5ed3 100644 --- a/lib/functions/score_function.dart +++ b/lib/functions/score_function.dart @@ -25,7 +25,22 @@ gets the score 1. So if the method gets the hand [1, 1] the score would be 12 int CalculateScore(List hand){ - var card1 = hand[0]; + var score = 0; + var checkAce = true; + for(var i = 0; i < hand.length ; i++) { + if(hand[i] > 1 && hand[i] <= 10) { + score = score + hand[i]; + } else if(hand[i] >= 11 && hand[i]<= 13 ) { + score = score+10; + }else if(hand[i] == 1 && checkAce == true) { + score = score + 11; + checkAce = false; + }else if(hand[i] == 1 && checkAce == false) { + score = score + 1; + } + } + + /*var card1 = hand[0]; var card2 = hand[1]; var score = 0; @@ -43,7 +58,7 @@ int CalculateScore(List hand){ score = score+1; } else if(card2 >= 11 && card2 <= 13 ) { score = score+10; - } + }*/ return score; } \ No newline at end of file From fd62485fc93f7598163d5ba7ef3c6f084420cf79 Mon Sep 17 00:00:00 2001 From: hardardottir93 Date: Sat, 22 Mar 2025 11:58:29 +0000 Subject: [PATCH 16/22] works now --- lib/functions/shuffled_deck.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/functions/shuffled_deck.dart b/lib/functions/shuffled_deck.dart index e87dbd3..ea3f52e 100644 --- a/lib/functions/shuffled_deck.dart +++ b/lib/functions/shuffled_deck.dart @@ -8,6 +8,8 @@ Shuffler And when run, returns a shuffled deck of cards. No inputs, only output. */ -List ShuffledDeck(){ -return []; +List ShuffledDeck(){ + List deck = DeckOfCards(); + deck.shuffle(); + return deck; } \ No newline at end of file From 2c5084d0ccc10b24f88d1dd9795a944f4754ecf5 Mon Sep 17 00:00:00 2001 From: Haukur81 Date: Sat, 22 Mar 2025 12:15:34 +0000 Subject: [PATCH 17/22] Update draw_card.dart --- lib/functions/draw_card.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/functions/draw_card.dart b/lib/functions/draw_card.dart index 4bc05ca..e46e2de 100644 --- a/lib/functions/draw_card.dart +++ b/lib/functions/draw_card.dart @@ -18,10 +18,9 @@ print(hand); // Should print [1] void DrawCard(List hand, List deck){ if (deck.isNotEmpty) { - // Take the first card from the deck + int card = deck.removeAt(0); - // Add the card to the hand hand.add(card); } From d2fd8f8140a1b8d2cf3b30256080188b9c8421c6 Mon Sep 17 00:00:00 2001 From: Haukur81 Date: Sat, 22 Mar 2025 12:31:40 +0000 Subject: [PATCH 18/22] Update draw_card.dart --- lib/functions/draw_card.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions/draw_card.dart b/lib/functions/draw_card.dart index e46e2de..4323261 100644 --- a/lib/functions/draw_card.dart +++ b/lib/functions/draw_card.dart @@ -18,7 +18,7 @@ print(hand); // Should print [1] void DrawCard(List hand, List deck){ if (deck.isNotEmpty) { - + int card = deck.removeAt(0); hand.add(card); From 561ac9bb05ed33af2b7786188cfe7a3ff5b379a9 Mon Sep 17 00:00:00 2001 From: Heiddi187 Date: Sat, 22 Mar 2025 12:34:43 +0000 Subject: [PATCH 19/22] Update deal_card.dart --- lib/functions/deal_card.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/functions/deal_card.dart b/lib/functions/deal_card.dart index 121f594..b95b4d2 100644 --- a/lib/functions/deal_card.dart +++ b/lib/functions/deal_card.dart @@ -13,6 +13,11 @@ print(deck); // Should print [2, 3, 4] */ +import 'package:BlackJack/functions/functions.dart'; + int DealCard(List deck){ -return 0; + int myCard = ShuffledDeck().removeAt(0); + + print(myCard); +return myCard; } \ No newline at end of file From ab2a8dd02e6ecd716cab2c6100dd8a98087d93ea Mon Sep 17 00:00:00 2001 From: JonGunnar04 Date: Sat, 22 Mar 2025 12:34:49 +0000 Subject: [PATCH 20/22] Cardnamer cardnamer --- .idea/Dart_Functions_BlackJack_Stripped.iml | 1 - .idea/libraries/Dart_Packages.xml | 404 -------------------- bin/BlackJack.dart | 1 + lib/functions/money_grab.dart | 39 +- 4 files changed, 35 insertions(+), 410 deletions(-) delete mode 100644 .idea/libraries/Dart_Packages.xml 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 deleted file mode 100644 index cf13806..0000000 --- a/.idea/libraries/Dart_Packages.xml +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/bin/BlackJack.dart b/bin/BlackJack.dart index dfc1d3c..639c4bf 100644 --- a/bin/BlackJack.dart +++ b/bin/BlackJack.dart @@ -7,4 +7,5 @@ import 'package:BlackJack/lib.dart'; void main() { print(DeckOfCards()); + PlaceBet(BuyIn()); } diff --git a/lib/functions/money_grab.dart b/lib/functions/money_grab.dart index 71522b5..ecb470e 100644 --- a/lib/functions/money_grab.dart +++ b/lib/functions/money_grab.dart @@ -18,10 +18,39 @@ Can you design the function such that it will ask the user again if he doesn't input a integer? */ -int PlaceBet(int bankRoll){ -return 0; +int PlaceBet(int bankRoll) { + while (true) { + try { + print('Place your bet now:'); + int input = int.parse(stdin.readLineSync()!); + if (input <= 0) { + print('Your bet cannot be lower or equal to 0!'); + } else if (input > bankRoll) { + print('Your bet cannot be higher than $bankRoll!'); + } else { + print('Your bet is: $input'); + return input; + } + } catch (e) { + print('invalid input! Your bet needs to be a number.'); + } + } } -int BuyIn(){ -return 0; -} \ No newline at end of file +int BuyIn() { + while (true) { + try { + print('How much would you like to buy in for?'); + print('The minimum buy in is \$50:'); + int input = int.parse(stdin.readLineSync()!); + if (input < 50) { + print('Minimum buy in is \$50.'); + } else { + print('Your buy in is: $input'); + return input; + } + } catch (e) { + print('invalid input! Your bet needs to be a number.'); + } + } +} From dacbd18ecd9890ea8cef74b57ef3589aa1b71cc2 Mon Sep 17 00:00:00 2001 From: hardardottir93 Date: Sat, 22 Mar 2025 12:37:53 +0000 Subject: [PATCH 21/22] works now --- lib/functions/score_function.dart | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/lib/functions/score_function.dart b/lib/functions/score_function.dart index 6cc5ed3..6b33ea8 100644 --- a/lib/functions/score_function.dart +++ b/lib/functions/score_function.dart @@ -40,25 +40,5 @@ int CalculateScore(List hand){ } } - /*var card1 = hand[0]; - var card2 = hand[1]; - var score = 0; - - if(card1 > 1 && card1 <= 10) { - score = score + card1; - } else if(card1 == 1) { - score = score+11; - } else if(card1 >= 11 && card1 <= 13 ) { - score = score+10; - } - - if(card2 > 1 && card2 <= 10) { - score = score + card1; - } else if(card2 == 1) { - score = score+1; - } else if(card2 >= 11 && card2 <= 13 ) { - score = score+10; - }*/ - return score; } \ No newline at end of file From f9162436098fcff41f2ec40a3e44d3873516f8e6 Mon Sep 17 00:00:00 2001 From: JonGunnar04 Date: Sat, 22 Mar 2025 13:20:19 +0000 Subject: [PATCH 22/22] =?UTF-8?q?check=20if=20busted=20kl=C3=A1ra=C3=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/Dart_Functions_BlackJack_Stripped.iml | 1 + .idea/libraries/Dart_Packages.xml | 396 ++++++++++++++++++++ .idea/libraries/Dart_SDK.xml | 46 +-- lib/functions/check_if_busted.dart | 5 +- 4 files changed, 424 insertions(+), 24 deletions(-) create mode 100644 .idea/libraries/Dart_Packages.xml diff --git a/.idea/Dart_Functions_BlackJack_Stripped.iml b/.idea/Dart_Functions_BlackJack_Stripped.iml index 90642e6..ae9af97 100644 --- a/.idea/Dart_Functions_BlackJack_Stripped.iml +++ b/.idea/Dart_Functions_BlackJack_Stripped.iml @@ -10,5 +10,6 @@ + \ No newline at end of file diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml new file mode 100644 index 0000000..7719a49 --- /dev/null +++ b/.idea/libraries/Dart_Packages.xml @@ -0,0 +1,396 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml index 8fbdc2a..1e467b3 100644 --- a/.idea/libraries/Dart_SDK.xml +++ b/.idea/libraries/Dart_SDK.xml @@ -1,29 +1,29 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/functions/check_if_busted.dart b/lib/functions/check_if_busted.dart index b2ad0b5..ff33585 100644 --- a/lib/functions/check_if_busted.dart +++ b/lib/functions/check_if_busted.dart @@ -20,5 +20,8 @@ Example inputs bool CheckIfBusted(List hand){ -return false; + int busted = CalculateScore(hand); + if(busted > 21){ + return true; + } return false; }