package cs201.structures.bank;

import java.util.List;

import cs201.roles.bankRoles.BankGuardRole;
import cs201.roles.bankRoles.BankTellerRole;
import cs201.structures.Structure;


public class Bank extends Structure {
	
	//================================================================================
    // Member Variables
    //================================================================================
	
	List<BankTellerRole> bankTellers;
	BankGuardRole bankGuard;
	boolean isOpen;
	double bankBalance;
	
	public enum AccountTypes { BUSINESS, PERSONAL }
	HashMap<int actNumber, double balance> personalAccounts;
	HashMap<int actNumber, double balance> businessAccounts;
	
	
	//================================================================================
    // Constructors
    //================================================================================
	
	public Bank(int x, int y, int width, int height, int id) {
	    super(x, y, width, height, id);
	}
	
	//================================================================================
    // Methods
    //================================================================================
	
	// Returns a list of this Bank's tellers
	public List<BankTellerRole> getTellers() {
	    return bankTellers;
	}
	// Returns the bank's guard
	public static BankGuardRole getGuard() {
	    return bankGuard;
	}
	// Returns SimCity201's personal accounts
	public HashMap<int actNumber, double balance> getPersonalAccounts() {
	    return personalAccounts;
	}
	// Returns SimCity201's business accounts
	public HashMap<int actNumber, double balance> getBusinessAccounts() {
	    return businessAccounts;
	}
	// Returns the total money held inside of the Bank (Useful for granting loans)
	public double getBankBalance() {
	    for(int actNum : personalAccounts.keySet()) {
	       bankBalance += personalAccounts.get(actNum);
	    }
	    for(int actNum : businessAccounts.keySet()) {
	       bankBalance += businessAccounts.get(actNum);
	    }
	    return bankBalance;
	}
	// Sets whether this Bank is open or closed
	public void setOpen(boolean open) {
	    isOpen = open;
	}
	// Returns whether or not this Bank is open
	public static boolean getOpen() {
	    return isOpen;
	}
	
}
@@ -46,14 +46,108 @@
 til.
-List;%0A
+HashMap;%0Aimport java.util.List;%0A%0Aimport cs201.agents.PersonAgent.Intention;%0Aimport cs201.roles.Role;
 %0Aimp
@@ -542,16 +542,23 @@
 llers;%0A%09
+static 
 BankGuar
@@ -575,16 +575,23 @@
 Guard;%0A%09
+static 
 boolean 
@@ -682,97 +682,51 @@
 hMap
-%3Cint actNumber, double balance%3E personalAccounts;%0A%09HashMap%3Cint actNumber, double balance%3E
+ personalAccounts = new HashMap();%0A%09HashMap
  bus
@@ -738,16 +738,32 @@
 Accounts
+ = new HashMap()
 ;%0A%09%0A%09%0A%09/
@@ -1516,39 +1516,8 @@
 hMap
-%3Cint actNumber, double balance%3E
  get
@@ -1632,39 +1632,8 @@
 hMap
-%3Cint actNumber, double balance%3E
  get
@@ -1801,24 +1801,26 @@
 ce() %7B%0A%09    
+/*
 for(int actN
@@ -2019,24 +2019,26 @@
 Num);%0A%09    %7D
+*/
 %0A%09    return
@@ -2261,12 +2261,118 @@
 Open;%0A%09%7D
+%0A%0A%09@Override%0A%09public Role getRole(Intention role) %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09return null;%0A%09%7D
 %0A%09%0A%7D

Fix errors in Bank structure