And I have quite an error in it, when being followed by an enemy and getting against the wall, instead of moving to the side it bounces and that makes it get eaten
Sliced up circle
code-golf geometry
You should write a program or function that given an N by N equally spaced square grid and a solid inscribed circle outputs or returns the number of slices the grid cuts up the solid circle.
0-sized slices (i.e. when the circle only touches a line) are not c...
There is a debug button in the very bottom left. You can use setMsg() and any messages will be displayed, aloing with allo fhte move information of all the other bots too.
what is the best-practice in python for calling functions with mutable objects (eg. lists)? do the caller copies it before call, or the called function makes a (deep) copy, or the caller creates an immutable version or something else?
Funnily enough, even though it isn't malicious, Pastebin did not require a captcha. I could've easily hidden anything there. Every time I submit a legit UserScript etc. I'm presented with the friendly "spam prevention"
Your job is to generate a heightmap and show it as a paralell projected, voxel landscape. The rules are the following:
The (heightmap of the) landscape has to be randomly generated
You also have to describe how the algorithm you are using works, so everyone can learn something new here
You have...
UPDATED SCORING: As this challenge is more difficult than I anticipated, I have adjusted the scoring. A program that can solve a single mirror input is a valid answer. More sophisticated programs get a bonus to their score.
There have been several puzzles on PPCG to find a laser path in a box of...
The scheme I've come up with is borrowed from integer encodings in lisp. We steal a few bits from the top of the integers used to represent the basic "number type". With a tag of zero, the remaining value is the integer value. With a non-zero tag, the tag represents a table-selector, and the remaining value is an index into that table. The various tables will store full-width integers, floating-point values, what-have-you.
Multiprecision integers are integer values that can be larger than the machine word (32 or 64 bit usually).
So you have to store a sort of string-of-digits of integers. It's also called a Bignum.