View bot.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(api.turn() == 0) { | |
api.towardsX() | |
} else if (api.turn() == 1) { | |
api.towardsY() | |
} else { | |
var dirs = ['awayX', 'awayY', 'towardsX', 'towardsY'] | |
if (typeof api.dir == 'undefined') { | |
api.dir = 0; | |
} | |
if ((api.turn() + 1) % 2) { |
View bot.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// grabbed from gist | |
if((api.turn() % 10) == 0) { | |
directions = ['towardsY', 'towardsX', 'awayY', 'awayX']; | |
dir = Math.floor(Math.random() * 4); | |
api[directions[dir]](); | |
} |
View wat.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Wat | |
def fine | |
foo | |
end | |
def not_fine | |
self.foo | |
end | |
View result.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
decimal binary | |
1 000000000 + + + + + + + + = = £0.00 | |
2 000000001 + + + + + + + + 1 = 1 = £0.01 | |
3 000000010 + + + + + + + 2 + = 2 = £0.02 | |
4 000000011 + + + + + + + 2 + 1 = 3 = £0.03 | |
5 000000100 + + + + + + 5 + + = 5 = £0.05 | |
6 000000101 + + + + + + 5 + + 1 = 6 = £0.06 | |
7 000000110 + + + + + + 5 + 2 + = 7 = £0.07 | |
8 000000111 + + + + + + 5 + 2 + 1 = 8 = £0.08 | |
9 000001000 + + + + + 10 + + + = 10 = £0.10 |
View bot.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ((api.turn() % 2) == 0) { | |
api.towardsY(); | |
} else { | |
api.towardsX(); | |
} |
View bot.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Named for Alan Faraday, elder brother of game creator. | |
if (api.turn() < 30) { | |
api.awayY(); | |
} else if (api.turn() < 60) { | |
api.awayX(); | |
} else { | |
if (api.turn() % 54 < 27) { | |
api.towardsY(); | |
} else { | |
api.towardsX(); |
View bot.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof this.n === 'undefined') { | |
this.n = 0; | |
} else { | |
this.n = (this.n + 1) % 4 | |
} | |
if((api.turn() % 3) == 0) { | |
directions = ['towardsY', 'towardsX', 'awayY', 'awayX']; | |
api[directions[this.n]](); | |
} |
View bot.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if((api.turn() % 10) == 0) { | |
directions = ['towardsY', 'towardsX', 'awayY', 'awayX']; | |
dir = Math.floor(Math.random() * 4); | |
api[directions[dir]](); | |
} |
View bot.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
directions = ['towardsY', 'towardsX', 'awayY', 'awayX']; | |
dir = Math.floor(Math.random() * 4); | |
api[directions[dir]](); |
View dumb_search.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DumbSearch | |
def initialize(min, max) | |
#@min = min | |
#@max = max | |
@guessed = false | |
@next_guess = 50 | |
end | |
attr_reader :next_guess, :guessed |