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 (me.getX() == map.getWidth() - 3 && me.getY() == 8) { | |
me.move('right'); | |
} | |
if (me.getX() == map.getWidth() - 2 && me.getY() >= 7 && me.getY() <= 15) { | |
me.move('down'); | |
} | |
var seen = {}; | |
var frontier = []; | |
var moves = map.getAdjacentEmptyCells(me.getX(), me.getY()); |
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
require 'cinch' | |
require 'set' | |
require 'yaml' | |
# I'm not using this, but we can think about it. | |
module Cinch; class Authorization | |
class Group | |
attr_reader :authnames |
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 Card | |
attr_reader :rank, :suit | |
def initialize(rank, suit) | |
@rank = rank | |
@suit = suit | |
end | |
def to_s | |
"#{@rank} of #{@suit}" | |
end |
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
// points, red, green, blue, white, black | |
protected final static Card[] cardsNormal = new Card[]{ | |
// 3 pointer: 5 of self+2, 3 of every other color except self | |
// 4 pointer single: 7 of self+1 | |
// 4 pointer multi: 6 of self+1, 3 of self, 3 of self+2 | |
// 5 pointer: 7 of self+1, 3 of self | |
new Card(CardLevel.THREE, TokenColor.BLACK, 3, 3, 5, 3, 3, 0), | |
new Card(CardLevel.THREE, TokenColor.BLACK, 4, 6, 3, 0, 0, 3), | |
new Card(CardLevel.THREE, TokenColor.BLACK, 4, 7, 0, 0, 0, 0), |
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
dod -> pop | |
dollop -> dollop | |
dot -> top | |
dots -> stop | |
loot -> tool | |
loots -> stool | |
los -> sol | |
nu -> nu | |
otto -> otto | |
plot -> told |
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
MAPPINGS = { | |
#?A | |
?B => "BLANK", | |
#?C | |
?D => "DONE", | |
?E => "LIKE", | |
?F => "FIRST", | |
#?G | |
?H => "HOLD", | |
#?I |
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
#Total at 161201 2696 | |
Python 638 | |
Javascript 270 | |
Java 206 | |
Ruby 206 | |
C# 158 | |
Haskell 116 | |
Go 101 | |
C++ 86 | |
PHP 85 |
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
module FlowerPuzzle | |
refine Array do | |
def to_i | |
reduce(0) { |acc, e| acc * 3 + e } | |
end | |
def apply_move(move) | |
zip(move).map { |a, b| (a + b) % 3 } | |
end | |
end |
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 std::marker::PhantomData; | |
macro_rules! planet { | |
($planet: ident, $planetage: ident, $period: expr) => { | |
pub struct $planet; | |
impl Planet for $planet { fn period() -> f32 { $period } } | |
pub type $planetage = Age<$planet>; | |
}; | |
} |
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
rect 70x2 | |
rotate column x=69 by 3 | |
rotate row y=3 by 1 | |
rotate column x=68 by 2 | |
rotate column x=67 by 5 | |
rotate column x=66 by 5 | |
rotate row y=5 by 69 | |
rotate column x=64 by 5 | |
rotate row y=2 by 66 | |
rotate column x=63 by 1 |
OlderNewer