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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(100); | |
if (Math.random() > 0.5) { |
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
var mainTank= {}; | |
var cloneTank= {}; | |
var curTank= {}; | |
function updateTank(robot) | |
{ | |
getCurTank( robot); | |
curTank.id= robot.id; | |
curTank.parentId= robot.parentId; | |
curTank.position= robot.position; |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
var self = this; | |
self.robot = robot; | |
self.members = {}; | |
self.enemies = {}; |
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
================================================================================= | |
2014-03-01 19:48:56 - total btc=0.25267965985874 , cur_price=0.00000180, my_btc=0.00183219 , my_doge=104481.25547708 , b_c=2 , s_c=0 | |
my orders - Buy 1989.00000000 at price 0.00000169 , total btc 0.00336141 | |
my orders - Sell 33011.00000000 at price 0.00000186 , total btc 0.06140046 | |
================================================================================= | |
2014-03-02 19:36:57 - total btc=0.23615833920149 , cur_price=0.00000168, my_btc=0.00064735 , my_doge=105992.25547708 , b_c=3 , s_c=0 | |
my orders - Buy 758.00000000 at price 0.00000156 , total btc 0.00118248 | |
my orders - Sell 33489.00000000 at price 0.00000171 , total btc 0.05726619 | |
================================================================================= | |
2014-03-02 21:06:34 - total btc=0.240985275228 , cur_price=0.00000172, my_btc=0.07380000 , my_doge=31798.25547708 , b_c=0 , s_c=1 |
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
#include <iostream> | |
#include <ctime> | |
using namespace std; | |
const int MAX_SIZE= 16; | |
int cols[ MAX_SIZE+ 1], x[ 2* MAX_SIZE], y[ 2* MAX_SIZE]; | |
int queen( int n, int row) |
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
--telegram-cli -v -s village_game.lua | |
function ok_cb(extra, success, result) | |
end | |
function sleep(n) | |
os.execute("sleep " .. tonumber(n)) | |
end | |
function vardump(value, depth, key) | |
local line_prefix = "" |
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
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
import discord | |
import asyncio | |
import sys | |
import random | |
import feedparser | |
import ssl | |
import re |