Created initial version. Added class Village & tests for it
Added AttackReport class. Added test html files to use as stubs for TestAttackReport. Changed 'time.localtime()' calls to 'time.gmtime()' (all reports come from server in GMT time, so need to fit all attacks/refreshes/estimates to GMT)
Fixed issue with parsing float-numbers in attack reports, extended tests
Added ReportBuilder class & tests. Added DummyRequestManager class to use as stub with ReportBuilder
Added Map class. Extended DummyRequestManager for TestMap tests. Added few HTML map-overview files to use with stubs.
Minor fix for ReportBuilder: added check for non-battle (non-green/non-yellow) reports
Fixed Map.update_saved_files method (now saves). Updated TestMap.
1. Created AttackQueue class2. Created Unit class; 3. Extended Village class with few state_check methods; 4. Few bug fixes; 5. Re-arranged project structure: logically related classes were placed to separate files
Added .distance_from_base attribute to Village. Re-factored Map class: now village is stored directly under (x, y) key. Updated other classes that used v_data['village'] & v_data['distance']. Updated tests
Updated tests for AttackQueue class
Extended AttackReport class: added verification for non-valid reports (w/o any of needed fields: recon, red, support). Updated TestAttackReport
Somehow working version. Some tests fail, need this commit as last almost safe checkpoint
Various bugfixes. 1. Fixed AttackObserver: self.queues are no longer flushed when notifying parent manager; 2. Fixed AttackQueue: visited villages are stored now in separate list and added again to attack_queue when they are ready for farm again; 3. Fixed AttackManager: queue is no longer re-built when it was not possible to send an attack; 4. AttackReport: mine-levels are corectly set now for 2-digit mine levels & for 0-level mines; 5. Insrted couple of print() 'profiling' statements in bottle-neck places of application.
Added runner script for AttackManager. Check point before AttackObserver modification
Updated AttackObserver class: when closing application, registered attacks are stored now in local file and added again to queues upon new start of application
Changed AttackObserver: now AttackManager's .new_reports flag is set to int (number of new reports). AttackManager will request .get_new_reports with a number of new reports as parameter (to flush new reports from subsequemt pages); Updated ReportBuilder to fit these changes
Fixed .get_saved_attacks in AttackObserver: now .new_battle_reports flag is set to int
1) Changed AttackObserver: arrival queue is now a mapping {(x, y): t_of_arrivla, ..} (to prevent adding villages to attack_queue that are pending an attack). Approprite changes were made to AO methods; 2) Changed AttackManager to adapt changes in AO: t_of_arrival is registered with coordinates; 3) Changed AttackQueue: attack_queue is not built upon init, but when Am is started; .build_queue method now accepts optional 'pending_arrival' mapping to avoid sending of duplicate attacks; .visited_villages changed to dict to avoid adding duplicates to .queue when flushing visited villages.
Commited so/so stable state before cloning
Moved specification 1 level up