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
.alternate .background, .alternate .front-wall { | |
transform: scaleX(-1); | |
} | |
.alternate .l1 { | |
clip: rect(auto, 112px, auto, 54px); | |
} |
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
setClass(viewport, "alternate", | |
(party.tile.row + party.tile.column + | |
(party.facing == Party.facingDirection.east || party.facing == Party.facingDirection.west ? 1 : 0) | |
) % 2 === 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
const l0 = party.peek([0, -1]); | |
const r0 = party.peek([0, 1]); | |
const l1 = party.peek([-1, -1]); | |
const f1 = party.peek([-1, 0]); | |
const r1 = party.peek([-1, 1]); | |
const l2 = party.peek([-2, -1]); | |
const f2 = party.peek([-2, 0]); | |
const r2 = party.peek([-2, 1]); | |
const ll3 = party.peek([-3, -2]); | |
const rr3 = party.peek([-3, 2]); |
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
.l1 { | |
clip: rect(auto, 122px, auto, 64px); | |
} | |
.left-wall { | |
display: inline-block; | |
position: absolute; | |
left: 0; | |
top: 0; | |
background-image: url(./img/WallLeft.png); | |
width: 168px; |
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
<div class="viewport"> | |
<div class="background"></div> | |
<div class="ll3 far-left-wall"></div> | |
<div class="rr3 far-right-wall"></div> | |
<div class="l3 left-wall"></div> | |
<div class="r3 right-wall"></div> | |
<div class="fl3 front-wall front-wall-farther"></div> | |
<div class="ff3 front-wall front-wall-farther"></div> | |
<div class="fr3 front-wall front-wall-farther"></div> | |
<div class="l2 left-wall"></div> |
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
await foreach (Result result in idx.Search("love")) | |
{ | |
// do something with that result | |
} |
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 index = await Index.Build(async builder => | |
{ | |
builder | |
.AddField("title") | |
.AddField("body") | |
await builder.Add(new Document | |
{ | |
{ "title", "Twelfth-Night" }, | |
{ "body", "If music be the food of love, play on: Give me excess of it…" }, |
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
public static class Util | |
{ | |
/// <summary> | |
/// An extension method that enables the deconstruction of dictionary entries. | |
/// </summary> | |
/// <example> | |
/// ```cs | |
/// foreach ((string key, Foo value) in someDictionaryOfFoos) | |
/// { | |
/// // Do something with `key` and `value`... |
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
public void Deconstruct(out int x, out int y) | |
{ | |
x = X; | |
y = Y; | |
} |
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
(double x, double y) = GetMiddlePoint(point1, point2); | |
// Proceed to using the x and y coordinates of the center |
NewerOlder