Skip to content

Instantly share code, notes, and snippets.

@syuilo
Created March 8, 2018 03:11
Show Gist options
  • Save syuilo/4d29d8a2c0a080d52dbad5b866fa3113 to your computer and use it in GitHub Desktop.
Save syuilo/4d29d8a2c0a080d52dbad5b866fa3113 to your computer and use it in GitHub Desktop.
/**
* 組み込みマップ定義
*
* データ値:
* - ... マス無し
* 0 ... マス
* b ... 初期配置される黒石
* w ... 初期配置される白石
*/
export type Map = {
name: string;
size: number;
data: string;
};
export const fourfour: Map = {
name: '4x4',
size: 6,
data:
'0000' +
'0wb0' +
'0bw0' +
'0000'
};
export const sixsix: Map = {
name: '6x6',
size: 6,
data:
'000000' +
'000000' +
'00wb00' +
'00bw00' +
'000000' +
'000000'
};
export const eighteight: Map = {
name: '8x8',
size: 8,
data:
'00000000' +
'00000000' +
'00000000' +
'000wb000' +
'000bw000' +
'00000000' +
'00000000' +
'00000000'
};
export const roundedEighteight: Map = {
name: '8x8 rounded',
size: 8,
data:
'-000000-' +
'00000000' +
'00000000' +
'000wb000' +
'000bw000' +
'00000000' +
'00000000' +
'-000000-'
};
export const roundedEighteight2: Map = {
name: '8x8 rounded 2',
size: 8,
data:
'--0000--' +
'-000000-' +
'00000000' +
'000wb000' +
'000bw000' +
'00000000' +
'-000000-' +
'--0000--'
};
export const eighteightWithNotch: Map = {
name: '8x8 with notch',
size: 8,
data:
'000--000' +
'00000000' +
'00000000' +
'-00wb00-' +
'-00bw00-' +
'00000000' +
'00000000' +
'000--000'
};
export const eighteightWithSomeHoles: Map = {
name: '8x8 with some holes',
size: 8,
data:
'000-0000' +
'00000-00' +
'00-00000' +
'000wb000' +
'000bw0-0' +
'-0000000' +
'000-0000' +
'00000000'
};
export const sixeight: Map = {
name: '6x8',
size: 8,
data:
'-000000-' +
'-000000-' +
'-000000-' +
'-00wb00-' +
'-00bw00-' +
'-000000-' +
'-000000-' +
'-000000-'
};
export const tenthtenth: Map = {
name: '10x10',
size: 10,
data:
'0000000000' +
'0000000000' +
'0000000000' +
'0000000000' +
'0000wb0000' +
'0000bw0000' +
'0000000000' +
'0000000000' +
'0000000000' +
'0000000000'
};
export const hole: Map = {
name: '10x10',
size: 10,
data:
'0000000000' +
'0000000000' +
'00wb00wb00' +
'00bw00bw00' +
'0000--0000' +
'0000--0000' +
'00wb00wb00' +
'00bw00bw00' +
'0000000000' +
'0000000000'
};
export const spark: Map = {
name: 'spark',
size: 10,
data:
'-0------0-' +
'0000000000' +
'-00000000-' +
'-00000000-' +
'-000wb000-' +
'-000bw000-' +
'-00000000-' +
'-00000000-' +
'0000000000' +
'-0------0-'
};
export const islands: Map = {
name: 'islands',
size: 10,
data:
'00000000--' +
'000wb000--' +
'000bw000--' +
'00000000--' +
'--0----0--' +
'--0----0--' +
'--00000000' +
'--000bw000' +
'--000wb000' +
'--00000000'
};
export const grid: Map = {
name: 'grid',
size: 10,
data:
'0000000000' +
'0-0-00-0-0' +
'0000000000' +
'0-0-00-0-0' +
'0000wb0000' +
'0000bw0000' +
'0-0-00-0-0' +
'0000000000' +
'0-0-00-0-0' +
'0000000000'
};
export const iphonex: Map = {
name: 'iPhone X',
size: 10,
data:
'-000--000-' +
'0000000000' +
'0000000000' +
'0000000000' +
'0000wb0000' +
'0000bw0000' +
'0000000000' +
'0000000000' +
'0000000000' +
'-00000000-'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment