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
function planner_loop (roomName, opts = {}) { | |
let _this = {}; | |
_this.visual = new RoomVisual(roomName); | |
_this.anchor = getAnchor(roomName); | |
_this.terrain = new Room.Terrain(roomName); | |
if (!_this.anchor) return; | |
let s = 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
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |
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
const colors = { | |
gray: '#555555', | |
light: '#AAAAAA', | |
road: '#666', // >:D | |
energy: '#FFE87B', | |
power: '#F53547', | |
dark: '#181818', | |
outline: '#8FBB93', | |
speechText: '#000000', | |
speechBackground: '#2ccf3b' |
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(!Memory.__segindex) { | |
Memory.__segindex = { | |
'index': {}, | |
'savelog': {}, | |
'buffer': {}, | |
'ttls': {}, | |
'clear': [], | |
'critical': [], | |
'last': 100 |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/* | |
Copyright (c) 2017 Robert Hafner <[email protected]> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
@echo off | |
REM %= Clone the $1 GitHub wiki into my repo =% | |
REM 1. Fork the repo on github normally (1 click) | |
REM 1.1 Click on Wiki tab in your repo and Create/Save blank page | |
REM 2. Copy repo URL from original, paste on command line. | |
REM 2.1 Copy repo URL from your Forked repo | |
REM 3. run this batch file with | |
REM @param1 = https://github.com/Sriep/screeps.git | |
REM @param2 = https://github.com/xyzzy529/screeps-1.git | |
REM |
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
// screep astar | |
// based off of javascript-astar 0.4.1 | |
// http://github.com/bgrins/javascript-astar | |
// Freely distributable under the MIT License. | |
// Implements the astar search algorithm in javascript using a Binary Heap. | |
// Includes Binary Heap (with modifications) from Marijn Haverbeke. | |
// http://eloquentjavascript.net/appendix2.html | |
// Modified for Screeps by Robert Hafner |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<link rel=stylesheet href="style.css" /> | |
<script src="jquery.js" type="text/javascript" charset="utf-8"></script> | |
<script> | |
(function(){ | |