fixed time to work with int - miliseconds (date.getTime()). Fixed schema for resources to be Number instead of date. Added initial buildings.
fixed time to work with int - miliseconds (date.getTime()). Fixed schema for resources to be Number instead of date. Added initial buildings.
added building scaling
made proper user coordinate generation
added game objects handler. Refreshes all game objects and if any attacks - passes them to the attack handler. Added attack handler. Added messages and reports model to mongoose to give reports to player.
staging attacks tests
slightly altered attack logic. Tested and introduced a pure function for battle simulations.
altered attack logic
Tested attack vastly. Added reports for both players. Added proper comebacks. All defender objects updated after attack. Everything conected to attack logic (excluding attack creation and defences generation) is working stable - tested. Introduced test folder containing that test