Implement all stub functions in game.py and bank.py#1
Open
Conversation
Closes ADG-VITV#6, ADG-VITV#11, ADG-VITV#24, ADG-VITV#25, ADG-VITV#26, ADG-VITV#27, ADG-VITV#28, ADG-VITV#29, ADG-VITV#30, ADG-VITV#31, ADG-VITV#32, ADG-VITV#33, ADG-VITV#34, ADG-VITV#35, ADG-VITV#36, ADG-VITV#37 game.py implementations: - Player.check_status() - displays all player stats - Player.level_up() - levels up at 100 XP - Player.use_oxygen() - consumes oxygen with low-supply check - Player.collect_gold() - adds gold with message - Alien.attack_player() - random damage 3 to max attack - SpaceGame.alien_encounter() - creates alien and starts combat - SpaceGame.combat() - turn-based combat loop with looting - SpaceGame.attack_alien() - random 5-15 damage - SpaceGame.loot_alien() - random 10-50 gold - SpaceGame.find_resources() - random 5-50 gold - SpaceGame.fuel_station() - restores 5-20 fuel - SpaceGame.empty_planet() - barren planet message - SpaceGame.asteroid_field() - asteroid event message - SpaceGame.space_pirates() - pirate encounter message - SpaceGame.ancient_ruins() - ruins discovery with XP - SpaceGame.lost_colony() - colony event message - SpaceGame.black_hole() - black hole event bank.py implementations: - Bank.create_account() - creates account with unique number - Bank.get_account() - retrieves account by number - Bank.list_accounts() - lists all account details - Bank.close_account() - removes account - Bank.transfer_funds() - transfers between accounts - Bank.generate_account_statement() - transaction history - Bank.calculate_total_assets() - sums all balances - Bank.process_loan_payments() - deducts loan installments - Account.deposit() - adds funds with transaction record - Account.withdraw() - removes funds with check - Account.get_balance() - returns balance - Account.get_transaction_history() - returns transactions - Account.apply_interest() - applies interest rate - Account.overdraft_protection() - checks withdrawal validity - Account.update_contact_information() - updates contact - Transaction.reverse_transaction() - negates amount - BankEmployee.view_account_details() - returns account number - BankEmployee.suspend_account() - returns suspension message - Loan.make_payment() - pays toward remaining balance - Loan.get_remaining_balance() - returns remaining - Loan.calculate_interest() - calculates interest on balance - Loan.check_loan_eligibility() - income>50k and score>650
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements all stub functions across game.py and bank.py.
game.py
Player.check_status()- displays all player statsPlayer.level_up()- levels up at 100 XP, resets XPPlayer.use_oxygen()- consumes 10 oxygen, blocks if below 10Player.collect_gold()- adds gold with messageAlien.attack_player()- random damage 3 to max attack powerSpaceGame.alien_encounter()- creates random alien, starts combatSpaceGame.combat()- turn-based combat with looting and XPSpaceGame.attack_alien()- random 5-15 damageSpaceGame.loot_alien()- random 10-50 goldSpaceGame.find_resources()- random 5-50 goldSpaceGame.fuel_station()- restores 5-20 fuelSpaceGame.empty_planet(),asteroid_field(),space_pirates(),ancient_ruins(),lost_colony(),black_hole()- event messagesbank.py
Bank.create_account()- unique account number generationBank.get_account()- lookup by account numberBank.list_accounts()- list all accountsBank.close_account()- remove accountBank.transfer_funds()- transfer with balance checkBank.generate_account_statement()- transaction historyBank.calculate_total_assets()- sum all balancesBank.process_loan_payments()- deduct loan installmentsAccount.deposit()/withdraw()- with transaction recordingAccount.get_balance()/get_transaction_history()Account.apply_interest()- compound interestAccount.overdraft_protection()- balance checkAccount.update_contact_information()- update contactTransaction.reverse_transaction()- negate amountBankEmployee.view_account_details()/suspend_account()Loan.make_payment()/get_remaining_balance()/calculate_interest()/check_loan_eligibility()Closes ADG-VITV#6, ADG-VITV#11, ADG-VITV#24, ADG-VITV#25, ADG-VITV#26, ADG-VITV#27, ADG-VITV#28, ADG-VITV#29, ADG-VITV#30, ADG-VITV#31, ADG-VITV#32, ADG-VITV#33, ADG-VITV#34, ADG-VITV#35, ADG-VITV#36, ADG-VITV#37