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
using System; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
class Cell { | |
public enum State { | |
None, | |
Mine, | |
} |
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
struct BITIter { | |
start: i64, | |
end: i64 | |
} | |
impl BITIter { | |
fn new(start: usize, end: usize) -> Self { | |
BITIter { start: start as i64, end: end as i64 } | |
} | |
} |
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
using Pkg; | |
Pkg.add("Plots"); | |
Pkg.add("GR"); | |
using Plots; | |
L = [0.3, 0.3]; | |
Lg = [0.15, 0.15]; | |
m = [0.5, 0.5]; | |
I = [5.4e-3, 5.4e-3]; | |
mL = 5.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
using System; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
using Internal; | |
enum Cell { | |
Empty, | |
Black, | |
White, |
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
<UserSettings><ApplicationIdentity version="16.0"/><ToolsOptions><ToolsOptionsCategory name="Environment" RegisteredName="Environment"/><ToolsOptionsCategory name="TextEditor" RegisteredName="TextEditor"><ToolsOptionsSubCategory name="Basic" RegisteredName="Basic" PackageName="Text Management Package"><PropertyValue name="TabSize">4</PropertyValue><PropertyValue name="ShowChanges">true</PropertyValue><PropertyValue name="AutoListMembers">true</PropertyValue><PropertyValue name="ShowPreview">true</PropertyValue><PropertyValue name="ShowMarks">true</PropertyValue><PropertyValue name="IndentStyle">2</PropertyValue><PropertyValue name="ShowCaretPosition">true</PropertyValue><PropertyValue name="HideAdvancedMembers">false</PropertyValue><PropertyValue name="ShowNavigationBar">true</PropertyValue><PropertyValue name="UseMapMode">false</PropertyValue><PropertyValue name="VirtualSpace">false</PropertyValue><PropertyValue name="ShowAnnotations">true</PropertyValue><PropertyValue name="ShowVerticalScrollBar">true</Prop |
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
export interface RotOffset { | |
x: number; | |
y: number; | |
} | |
export interface RotMat { | |
upToLeft: RotOffset[]; | |
leftToDown: RotOffset[]; | |
downToRight: RotOffset[]; | |
rightToUp: RotOffset[]; |
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 "Board.hpp" | |
void defaultEndGame(Judge) {} | |
Board make() { | |
Board made{}; | |
for (int y = 0; y < 3; ++y) { | |
for (int x = 0; x < 3; ++x) { | |
made.cells[x][y] = Cell::Empty; // マスめの なかみは カラッポ! | |
} |
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
#ifndef EVENT_SOURCE_HPP | |
#define EVENT_SOURCE_HPP | |
#include <functional> | |
#include <vector> | |
template<class ...Args> | |
class EventSource { | |
public: | |
using Listener = std::function<void(Args...)>; |
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
// イベント駆動型プログラミング言語 Alyr (開発予定) | |
/* | |
他の言語にホストしてもらって動作するスクリプト言語 | |
各イベントはシングルスレッド上で非同期実行される | |
状態 Outside に発行されるイベントはホストから購読できる | |
*/ | |
value VirusKind = enum { Tiny, Normal, Huge, }; | |
value Position = enum { Holder, Board = struct { int x; int y }, }; | |
impl 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
enum Expr { | |
Num(i64), | |
Op(Box<Expr>, fn(i64, i64) -> i64, Box<Expr>), | |
} | |
#[derive(Debug)] | |
enum Token { | |
Num(i64), | |
Add, | |
Sub, |