Press ESC to close

how to make a basic ai in javascript