Skip to content

Implement all stub functions in game.py and bank.py#1

Open
kovadev17 wants to merge 1 commit intomainfrom
implement-all-functions
Open

Implement all stub functions in game.py and bank.py#1
kovadev17 wants to merge 1 commit intomainfrom
implement-all-functions

Conversation

@kovadev17
Copy link
Copy Markdown
Owner

This PR implements all stub functions across game.py and bank.py.

game.py

  • Player.check_status() - displays all player stats
  • Player.level_up() - levels up at 100 XP, resets XP
  • Player.use_oxygen() - consumes 10 oxygen, blocks if below 10
  • Player.collect_gold() - adds gold with message
  • Alien.attack_player() - random damage 3 to max attack power
  • SpaceGame.alien_encounter() - creates random alien, starts combat
  • SpaceGame.combat() - turn-based combat with looting and XP
  • 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(), asteroid_field(), space_pirates(), ancient_ruins(), lost_colony(), black_hole() - event messages

bank.py

  • Bank.create_account() - unique account number generation
  • Bank.get_account() - lookup by account number
  • Bank.list_accounts() - list all accounts
  • Bank.close_account() - remove account
  • Bank.transfer_funds() - transfer with balance check
  • Bank.generate_account_statement() - transaction history
  • Bank.calculate_total_assets() - sum all balances
  • Bank.process_loan_payments() - deduct loan installments
  • Account.deposit() / withdraw() - with transaction recording
  • Account.get_balance() / get_transaction_history()
  • Account.apply_interest() - compound interest
  • Account.overdraft_protection() - balance check
  • Account.update_contact_information() - update contact
  • Transaction.reverse_transaction() - negate amount
  • BankEmployee.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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement alien_encounter() in game.py()

1 participant