View ints.go
type scoreInt uint64
var (
// If you think I came up with these values by hand... LOL
//
// Each bit in a value represents the presence or absence
// of a score multiplier in the 8x8 upper-left corner of
// the board.
TWInt = scoreInt(0x8000000000000081)
DWInt = scoreInt(0x100000810204000)
View literal.go
// I was going to use slices, but hey I'm lazy why not let the compiler
// verify that I put the right number rows and columns in?
type literalBoard [8][8]ScoreType
var (
LiteralBoard = literalBoard{
{TW, None, None, DL, None, None, None, TW},
{None, DW, None, None, None, TL, None, None},
{None, None, DW, None, None, None, DL, None},
{DL, None, None, DW, None, None, None, DL},
View conditional.go
// ScoreAtConditional uses a series of conditional checks to determine what a
// particular square's score multiplier is.
func ScoreAtConditional(x, y int) ScoreType {
// Symmetric adjustments if x or y > 7 to simplify checks below.
if x > 7 {
x = 14 - x
}
if y > 7 {
y = 14 - y
View designer.html
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-pages/core-pages.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-icons/maps-icons.html">
View designer.html
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
<polymer-element name="my-element">
View designer.html
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
View designer.html
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
View designer.html
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-item/paper-item.html">
<polymer-element name="my-element">
<template>
View λ.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-16" />
<title>
λ in JavaScript
</title>
<script type='text/javascript'>
Array.prototype.forEach = function(λ) {
for (var i = 0; i < this.length; i++) {
View perlin-noise-classical.js
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
//
// Sean McCullough banksean@gmail.com
/**
* You can pass in a random number generator object if you like.
* It is assumed to have a random() method.
*/