kidb
Re:The Man Who Built Catan
on Monday February 17, 2014 @07:01AM (#7251650)
I'm too lazy to look it up right now, but I think you can continue to build on the road, BUT if they put a settlement at the end of your road you can't continue to build.
E.g. if [x] is your settlement, [o] is an opponent's and = is a road:
[x]==[0]= <-- you can build another road here [x]==[0] <-- you can't build another road
Re:Strangest Programming Language Feature?
on Friday January 31, 2014 @09:57PM (#7160668)
I think the trick is that array[i] and i[array] will always be the same value in C.
It's confusing because array[i] makes sense but i[array] doesn't (how the hell can you use an array as an index on an integer?)
It works because array is a pointer to a memory address and i (or index) is an offset. array[i] will add the index to the memory address and return the value there, where as i[array] will add the memory address to the index. Since array+index == index+array, they point to the same memory and return the same value.