shoutkey.com/saw
shoutkey.com/gave
http://tile.stamen.com/watercolor/{z}/{x}/{y}.jpg
## | |
# Any conditional expression evaluates to either `True` or `False`, if you want to return a boolean value | |
# based on a conditional expression, you can just use that expression, without an if/else block | |
## | |
# The common mistake (overly verbose and overcomplicated): | |
def isSameNumber(x, y): | |
''' | |
Returns True if (and only if) x and y are equivalent; false otherwise |
#Challenges to make robocode more interesting
Pack:
Build team bots that stay in formation around a common target, eg: If a squad of three bots acquires a target, they should surround it and hold in an equilateral triangle with the target in the center. Extra challenge: account for walls if that makes a formation impossible and adjust accordingly (tighten formation or pin/corner the target)
Swarm:
Bots must move in an infinite loop pattern, avoiding collisions with each other, and adjusting slightly to avoid incoming fire while continuing to maintain the formation/avoiding disrupting other bots. Examples include figure 8, circular helix, and other complex geometric patterns. more examples can be found in this video
A collection of reading resources I recommend, organized loosley by topic.
Notes:
- If a link is dead leave me a comment and I will fix it or find it on the wayback machine.
- Links to Amazon.com and other online stores are Not Currently affiliate links (I do not get any money if you purchase something I linked to). This may change in the future (and this note will be updated accordingly).
Let's create a todo list. this first exercise is for when you have just started learning a language and will start out super simple. The whole "application" will be entirely text-based and run on a command line -- no fancy GUIs or databases here.
// Each of these functions has something wrong with it. Why won't it work and how can it be fixed? | |
//Produces the product of all numbers in an array | |
function product(numbers){ | |
var result = 0; | |
for(var i = 0; i < numbers.length; i++){ | |
result *= numbers[i]; | |
} | |
return result; | |
} |
OR
In the classroom, things like "actually try", "think about this seriously" "treat it like a real world project", "think like an engineer" are all shortcuts for "This is not just a thought exercise. The end product should be something that could actually be sold to client companies for them to use without having to write any of their own code" (except perhaps some CSS to apply their own branding).
Unlike most assignments, this is not structured as a lab or project. This is a challenge, with components that range in difficulty from the very simple to the extremely difficult. You can pick and choose which elements to implement, and should consider returning to this challenge from time to time throughout your career to continue expanding your knowlege and skills.
This GitHub repository is provided as a starting point. As long as you are familiar with Spring Boot and Maven projects it should be easy to start here.