Beta Test Colossus Clash

Well it looks like there are overlays on the basic tiles like blue or red

Capture
Isn’t there a method for includes in CoCo

Sorry, now I understand even less. Could you give me more details? I didnt get what you mean.

Whats the error? What is notwalkable?

an array I tried doing it with a simple array [0, 1, 2] but it still doesn’t work

Whats the error you see?

notWalkable has no method includes

Some AI competitions allow the user code to draw shapes directly on the world for debugging. For example, if my AI is calculating some kind of “danger area”, I might have by program shade that region red. I believe @unityjoaquimschaever is asking if CodeCombat has a visualization tools of that type. (It doesn’t; the shaded tiles are where it is legal to spawn units).

CodeCombat does not provide a full JS interpreter. Array.prototype.includes is a method modern JS implementations have but CC does not. I’d suggest checking if notWalkable.indexOf(openTile) != =-1.

1 Like

thank you very much. You are totally right about the visualazation.

Array.prototype.includes worked a month ago Underscore.js (1.13.1) contains - working in CoCo python

That example is with strings, not arrays. You can use lodash if you want to, but it is separate from Array.prototype.includes.

Its weird honestly, this method should work in coco js if string.includes works as they both from es2016. Maybe some bug in API restrictions. I will check

idea: make cronus’s special a potion brew (just like omarn’s abbility)
types: heal,strength,grow or damage

I think there are some coordinate mirroring issues with the blue team. If you try to move your colossus to its own position, it will move to the left.

image

def guard(e):
    colossus = e.colossus
    while True:
        colossus.moveTo(colossus.x, colossus.y)

def choose(place):
    return {
        'B': 'atlas',
        'C': 'atlas'
    }[place]

hero.chooseColossus = choose

hero.on('spawn-colossus', guard)
1 Like

Thank you. Fixed. It was an issue that mirrored coordinates returned 10 wrong x, so colossuses moved to the left.

1 Like