Skip to content

Instantly share code, notes, and snippets.

Avatar

Silas Brill Brilliand

View GitHub Profile
@Brilliand
Brilliand / bot.js
Created Oct 31, 2019
"Parry and Slice" bot for Grid Game KotH
View bot.js
const turn = api.turn();
if (turn === 0) {
this.generator = (function*() {
for(let i = 0; i < 5; i++) {
yield* [[3], [1, 2]];
}
yield* [[0, 30]];
for(let i = 0; i < 5; i++) {
@Brilliand
Brilliand / bot.js
Created Oct 29, 2019
"CBC Forever" bot for Grid Game KotH
View bot.js
const turn = api.turn();
const opening =
"SSSEEESSSEEEEEEEEEESSEEE"+
"SSSEEESSSEEEEEEESSEEEEEE"+
"SSSEEESSSEEEESSEEEEEEEEE"+
"SSSEEESSSESSEEEEEEEEEEEE";
const pattern = "NWSSSSEEESSSWNEESSEEEEEEEEEEEE";
if(turn < opening.length) {
switch (opening[turn]) {
case 'W':
@Brilliand
Brilliand / bot.js
Created Oct 29, 2019
"Feint" bot for Grid Game KotH
View bot.js
const turn = api.turn();
if (turn === 0) {
this.generator = (function* () {
yield* [[3, 8], [2, 16], [3], [0], [1], [0, 27]];
let laps = 1;
while(true) {
for (let i = 0; i < laps*10; ++i) {
yield* [[3, 2], [0]];
}
@Brilliand
Brilliand / bot.js
Created Oct 28, 2019
"CBC Goes With Everything" bot for Grid Game KotH
View bot.js
const turn = api.turn();
const opening = "EEESSSEEESSEEEEEEEEEESSSEEESSSENEEENSNSSSSEEEEEEEEESSSEEESSEEEESE";
if(turn < opening.length*5) {
switch (opening[turn%opening.length]) {
case 'W':
api.awayX();
break;
case 'N':
api.awayY();
break;
@Brilliand
Brilliand / bot.js
Created Oct 25, 2019
"Cage Bar Cutter" bot for Grid Game KotH
View bot.js
const turn = api.turn();
const opening = "EEESSSEEESSEEEEEEEEEESSSEEESSSENEEENSNSSSSEEEEEEEEESSSEEESSEEEESE";
if(turn < opening.length) {
switch (opening[turn]) {
case 'W':
api.awayX();
break;
case 'N':
api.awayY();
break;
@Brilliand
Brilliand / bot.js
Last active Oct 29, 2019
"Backstabber" bot for Grid Game KotH
View bot.js
const turn = api.turn();
if (turn === 0) {
this.generator = (function*() {
yield* [[0, 24], [1], [0], [3], [0, 3]];
for(let i = 0; i < 40; i++) {
yield* [[1], [2, 2]];
}
while (true) {
@Brilliand
Brilliand / bot.js
Last active Oct 28, 2019
"Galeforce" bot for Grid Game KotH
View bot.js
const turn = api.turn();
if (turn === 0) {
this.generator = (function* () {
yield* [[1, 24], [0], [1], [2], [1, 3]];
for (let i = 0; i < 9; ++i) {
yield* [[0], [3], [1]];
}
yield [0, 3];
@Brilliand
Brilliand / bot.js
Created Oct 23, 2019
"Persistent Drive" bot for Grid Game KotH
View bot.js
const turn = api.turn();
if (turn === 0) {
this.generator = (function* () {
yield* [[0, 30], [1, 30]];
for (let i = 0; i < 10; ++i) {
yield* [[3], [1, 2]];
}
for (let i = 0; i < 4; ++i) {
@Brilliand
Brilliand / bot.js
Last active Oct 23, 2019
"Biased Drive" bot for Grid Game KotH
View bot.js
const turn = api.turn();
if (turn === 0) {
this.generator = (function* () {
yield* [[0, 30], [1, 30]];
for (let i = 0; i < 10; ++i) {
yield* [[3], [1, 2]];
}
for (let i = 0; i < 4; ++i) {
@Brilliand
Brilliand / bot.js
Last active Oct 29, 2019
"Line Drive" bot for Grid Game KotH
View bot.js
const turn = api.turn();
if (turn === 0) {
this.generator = (function* () {
yield* [[0, 24], [1], [0], [3], [0, 3]];
for (let i = 0; i < 9; ++i) {
yield* [[1], [2], [0]];
}
yield [1, 3];
You can’t perform that action at this time.