odeke-em / mocollab Goto Github PK
View Code? Open in Web Editor NEWCollaboration of CMPUT 275 project
Collaboration of CMPUT 275 project
Providing a change log for assignment submission.
The Transport is a unit with the following features and attributes.
• It is a ground unit that can carry other ground units (except other transports).
• It has a capacity specifying the total unit_size of units it can carry.
• There is no limit to how many units can be loaded and unloaded in one turn.
5
• If the transport is destroyed, then all units in the transport are also destroyed.
Also, a line describing a Transport unit in a .lvl file has one additional integer specifying its
capacity.
When the transport is selected, notice that a new button on the display appears that says GATHER/UNLOAD.
One of two things happens when this button is pressed:
• If the transport is carrying at least one unit, then it tries to unload the unit that has been in the
transport the longest. It will search the four adjacent tiles to see if any of them can be occupied by
the unit. If so, then the unit is unloaded there. If the unit cannot be placed on any of these tiles,
then nothing happens.
• If the transport is empty, then it will gather some units into the transport. These units must be
non-transport ground units (on the same team) that can reach the transport in one turn and have not
yet moved this turn. Finally, the total unit_size of the units that are loaded will not exceed the
capacity of the transport.
Currently, the transport unit greedily selects the first units that will fit from the list of available units.
Your job is to implement a different specific behaviour for selecting which units to pick up.
The file gather.py is the only file you have to modify for this part. In it, there is a function
gather(transport, unit_list, value) where:
• transport is a Transport unit that is gathering units.
• unit_list is the list of eligible ground units that can be loaded into transport this turn (this
is already calculated for you before the function is called from within gui.py).
• value is a function mapping units to some value. In gui.py, it is called with a lambda function
that maps a unit to its remaining health.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.