conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
const { newTest } = getTestingFunctions();
const configuration = new testConfiguration.Configuration();
configuration.leader = '<space>';
configuration.otherModesKeyBindingsNonRecursive = [
{
before: ['leader', 'o'],
after: ['o', 'eSc', 'k'],
},
{
before: ['<leader>', 'f', 'e', 's'],
after: ['v'],
},
];
=======
suiteSetup(() => {
let configuration = new testConfiguration.Configuration();
configuration.leader = '<space>';
configuration.normalModeKeyBindingsNonRecursive = [
{
before: ['leader', 'o'],
after: ['o', 'eSc', 'k'],
},
];
>>>>>>>
const { newTest } = getTestingFunctions();
const configuration = new testConfiguration.Configuration();
configuration.leader = '<space>';
configuration.normalModeKeyBindingsNonRecursive = [
{
before: ['leader', 'o'],
after: ['o', 'eSc', 'k'],
},
{
before: ['<leader>', 'f', 'e', 's'],
after: ['v'],
},
];
<<<<<<<
const normalizedKeybinds = srcConfiguration.configuration.otherModesKeyBindingsNonRecursive;
const testingKeybinds = configuration.otherModesKeyBindingsNonRecursive;
assert.equal(normalizedKeybinds.length, testingKeybinds.length);
assert.deepEqual(normalizedKeybinds[0].before, [' ', 'o']);
assert.deepEqual(normalizedKeybinds[0].after, ['o', '<Esc>', 'k']);
});
=======
let configuration = srcConfiguration.configuration;
let keybindings = configuration.normalModeKeyBindingsNonRecursive;
>>>>>>>
const normalizedKeybinds = srcConfiguration.configuration.normalModeKeyBindingsNonRecursive;
const testingKeybinds = configuration.normalModeKeyBindingsNonRecursive;
assert.equal(normalizedKeybinds.length, testingKeybinds.length);
assert.deepEqual(normalizedKeybinds[0].before, [' ', 'o']);
assert.deepEqual(normalizedKeybinds[0].after, ['o', '<Esc>', 'k']);
}); |
<<<<<<<
=======
import useCounter from './useCounter';
import useUpdate from './useUpdate'
>>>>>>>
import useUpdate from './useUpdate' |
<<<<<<<
=======
export enum VimSpecialCommands {
Nothing,
ShowCommandLine,
Dot
}
export class ViewChange {
public command: string;
public args: any;
}
>>>>>>>
export class ViewChange {
public command: string;
public args: any;
}
<<<<<<<
public isMultiCursor = false;
=======
public static lastRepeatableMovement : BaseMovement | undefined = undefined;
>>>>>>>
/**
* Are multiple cursors currently present?
*/
public isMultiCursor = false;
public static lastRepeatableMovement : BaseMovement | undefined = undefined;
<<<<<<<
if (ModeHandler.IsTesting) {
return;
}
=======
if (e.textEditor.document.fileName !== this.fileName) {
return;
}
>>>>>>>
if (ModeHandler.IsTesting) {
return;
}
<<<<<<<
// If arrow keys or mouse was used prior to entering characters while in insert mode, create an undo point
// this needs to happen before any changes are made
/*
TODO
=======
// If arrow keys or mouse were in insert mode, create an undo point.
// This needs to happen before any changes are made
>>>>>>>
// If arrow keys or mouse was used prior to entering characters while in insert mode, create an undo point
// this needs to happen before any changes are made
/*
TODO
// If arrow keys or mouse were in insert mode, create an undo point.
// This needs to happen before any changes are made
<<<<<<<
=======
// console.log(vimState.historyTracker.toString());
>>>>>>> |
<<<<<<<
import useLockFn from './useLockFn';
=======
import useTrackedEffect from './useTrackedEffect';
>>>>>>>
import useLockFn from './useLockFn';
import useTrackedEffect from './useTrackedEffect'; |
<<<<<<<
import useTrackedEffect from './useTrackedEffect';
=======
import useWebSocket from './useWebSocket';
>>>>>>>
import useWebSocket from './useWebSocket';
import useTrackedEffect from './useTrackedEffect';
<<<<<<<
useTrackedEffect,
=======
useWebSocket,
>>>>>>>
useTrackedEffect,
useWebSocket, |
<<<<<<<
import { RecordedState } from './../mode/modeHandler';
import { Configuration } from './../configuration/configuration';
=======
import { RecordedState, VimState } from './../mode/modeHandler';
>>>>>>>
import { Configuration } from './../configuration/configuration';
import { RecordedState, VimState } from './../mode/modeHandler'; |
<<<<<<<
liveBlock: borderLiveBlock(format),
=======
standfirstLink: borderStandfirstLink(format),
>>>>>>>
liveBlock: borderLiveBlock(format),
standfirstLink: borderStandfirstLink(format), |
<<<<<<<
type ShareIconSize = 'small' | 'medium';
=======
type LeftColSize = 'compact'|'wide';
>>>>>>>
type ShareIconSize = 'small' | 'medium';
type LeftColSize = 'compact'|'wide'; |
<<<<<<<
import useCookieState from './useCookieState';
=======
import useSetState from './useSetState';
>>>>>>>
import useCookieState from './useCookieState';
import useSetState from './useSetState';
<<<<<<<
useCookieState,
=======
useSetState,
>>>>>>>
useCookieState,
useSetState, |
<<<<<<<
public static _createEnabled: boolean = false;
protected _enabled: boolean = true;
=======
public static _createEnabled = false;
/**
* 是否更新该系统。
*/
public enabled = true;
>>>>>>>
public static _createEnabled: boolean = false;
protected _enabled: boolean = true;
<<<<<<<
/**
* @internal
*/
protected _isEditorUpdate() {
return Application.isEditor && !Application.isPlaying;
}
/**
* @protected
*/
=======
>>>>>>>
/**
* @internal
*/
protected _isEditorUpdate() {
return Application.isEditor && !Application.isPlaying;
} |
<<<<<<<
import { signInGateDesignOpt } from '@frontend/web/experiments/tests/sign-in-gate-design-opt';
import { curatedContainerTest } from '@frontend/web/experiments/tests/curated-container-test';
=======
import { curatedContainerTest2 } from '@frontend/web/experiments/tests/curated-container-test';
import { deeplyReadTest } from '@root/src/web/experiments/tests/deeply-read-test';
import {
newsletterMerchUnitLighthouseControl,
newsletterMerchUnitLighthouseVariants,
} from '@root/src/web/experiments/tests/newsletter-merch-unit-test';
import { globalEoyHeaderTest } from '@root/src/web/experiments/tests/global-eoy-header-test';
>>>>>>>
import { signInGateDesignOpt } from '@frontend/web/experiments/tests/sign-in-gate-design-opt';
import { curatedContainerTest2 } from '@frontend/web/experiments/tests/curated-container-test';
import { deeplyReadTest } from '@root/src/web/experiments/tests/deeply-read-test';
import {
newsletterMerchUnitLighthouseControl,
newsletterMerchUnitLighthouseVariants,
} from '@root/src/web/experiments/tests/newsletter-merch-unit-test';
import { globalEoyHeaderTest } from '@root/src/web/experiments/tests/global-eoy-header-test';
<<<<<<<
abTestTest,
signInGateMainVariant,
signInGateMainControl,
signInGateDesignOpt,
curatedContainerTest,
=======
abTestTest,
signInGateMainVariant,
signInGateMainControl,
curatedContainerTest2,
newsletterMerchUnitLighthouseControl,
newsletterMerchUnitLighthouseVariants,
globalEoyHeaderTest,
deeplyReadTest,
>>>>>>>
abTestTest,
signInGateMainVariant,
signInGateMainControl,
signInGateDesignOpt,
curatedContainerTest2,
abTestTest,
signInGateMainVariant,
signInGateMainControl,
curatedContainerTest2,
newsletterMerchUnitLighthouseControl,
newsletterMerchUnitLighthouseVariants,
globalEoyHeaderTest,
deeplyReadTest, |
<<<<<<<
const backgroundHeadlineByline = (format: Format): string => {
if (format.theme === Special.SpecialReport)
return brandAltBackground.primary;
return 'transparent';
};
=======
const backgroundBullet = (format: Format): string => {
if (format.theme === Special.SpecialReport) return specialReport[300];
return pillarPalette[format.theme].main;
};
>>>>>>>
const backgroundHeadlineByline = (format: Format): string => {
if (format.theme === Special.SpecialReport)
return brandAltBackground.primary;
return 'transparent';
};
const backgroundBullet = (format: Format): string => {
if (format.theme === Special.SpecialReport) return specialReport[300];
return pillarPalette[format.theme].main;
};
<<<<<<<
headlineByline: backgroundHeadlineByline(format),
=======
bullet: backgroundBullet(format),
>>>>>>>
headlineByline: backgroundHeadlineByline(format),
bullet: backgroundBullet(format), |
<<<<<<<
contentType: 'Article',
=======
hasRelated: false,
hasStoryPackage: false,
>>>>>>>
contentType: 'Article',
hasRelated: false,
hasStoryPackage: false, |
<<<<<<<
useTextSelection,
useEventTarget
=======
useEventTarget,
useHistoryTravel
>>>>>>>
useTextSelection,
useEventTarget,
useHistoryTravel |
<<<<<<<
const options: Ajv.Options = {
verbose: true,
=======
const options = {
verbose: false,
>>>>>>>
const options: Ajv.Options = {
verbose: false, |
<<<<<<<
contentType: string;
=======
hasRelated: boolean;
hasStoryPackage: boolean;
>>>>>>>
contentType: string;
hasRelated: boolean;
hasStoryPackage: boolean; |
<<<<<<<
const fillCardClock = (format: Format): string => {
// Setting Card clock colour for immersive cards to all be dark grey
if (format.display === Display.Immersive) return neutral[60];
=======
const fillCardIcon = (format: Format): string => {
>>>>>>>
const fillCardIcon = (format: Format): string => {
// Setting Card clock colour for immersive cards to all be dark grey
if (format.display === Display.Immersive) return neutral[60]; |
<<<<<<<
import useCreation from './useCreation'
import { useDrag, useDrop } from './useDrop';
=======
import useCreation from './useCreation';
import useCounter from './useCounter'
>>>>>>>
import useCreation from './useCreation'
import { useDrag, useDrop } from './useDrop';
import useCounter from './useCounter'
<<<<<<<
useDrag,
useDrop,
=======
useCounter,
>>>>>>>
useDrag,
useDrop,
useCounter, |
<<<<<<<
import { ccpaApplies } from '@root/src/web/lib/ccpaApplies';
import { cmp } from '@guardian/consent-management-platform';
const show = (forceModal?: boolean) => {
if (forceModal) cmp.showPrivacyManager();
};
=======
import { cmp } from '@guardian/consent-management-platform';
import { getPrivacyFramework } from '@root/src/web/lib/getPrivacyFramework';
>>>>>>>
import { cmp } from '@guardian/consent-management-platform';
import { getPrivacyFramework } from '@root/src/web/lib/getPrivacyFramework';
const show = (forceModal?: boolean) => {
if (forceModal) cmp.showPrivacyManager();
}; |
<<<<<<<
headlineByline: Colour;
=======
bullet: Colour;
>>>>>>>
headlineByline: Colour;
bullet: Colour; |
<<<<<<<
import useNetwork from './useNetwork';
=======
import useTimeout from './useTimeout';
>>>>>>>
import useNetwork from './useNetwork';
import useTimeout from './useTimeout';
<<<<<<<
useNetwork,
=======
useTimeout,
>>>>>>>
useNetwork,
useTimeout, |
<<<<<<<
app.use(languageMiddleware);
=======
customMiddleware.forEach(middlewareElement => app.use(middlewareElement));
>>>>>>>
app.use(languageMiddleware);
customMiddleware.forEach(middlewareElement => app.use(middlewareElement)); |
<<<<<<<
browser.process().kill('SIGKILL');
=======
browser.close();
>>>>>>>
browser.close();
<<<<<<<
=======
if (this.singleUse) {
browser.on('disconnected', () => process.exit(0));
}
const page:any = await browser.newPage();
const port = url.parse(browserWsEndpoint).port;
const pageLocation = `/devtools/page/${page._target._targetId}`;
debug(`${req.url}: Proxying request to /devtools/page route: ${pageLocation}.`);
>>>>>>> |
<<<<<<<
animationDuration?: number; // 300
showAnimationDuration?: number; // animationDuration || 300
hideAnimationDuration?: number; // animationDuration || 300
easing?: Animated.TimingAnimationConfig['easing']; // null
showEasing?: Animated.TimingAnimationConfig['easing']; // easing || null
hideEasing?: Animated.TimingAnimationConfig['easing']; // easing || null
onStartHiding?: () => void; // null
onHidden?: () => void; // null
onPress?: () => void; // null
hideOnPress?: boolean; // true
swipePixelsToClose?: number; // 20
swipeEasing?: Animated.TimingAnimationConfig['easing']; // null
swipeAnimationDuration?: number; // 200
=======
/** How fast notification will appear/disappear
* @default 300 */
animationDuration?: number;
/** How fast notification will appear.
* @default animationDuration || 300 */
showAnimationDuration?: number;
/** How fast notification will disappear.
* @default animationDuration || 300 */
hideAnimationDuration?: number;
/** Animation easing. Details: https://reactnative.dev/docs/easing
* @default null */
easing?: (value: number) => number;
/** Show Animation easing.
* @default easing || null */
showEasing?: (value: number) => number;
/** Hide Animation easing.
* @default easing || null */
hideEasing?: (value: number) => number;
/** Function called when notification started hiding
* @default null */
onStartHiding?: Function;
/** Function called when notification completely hidden
* @default null */
onHidden?: Function;
/** Function called when user press on notification
* @default null */
onPress?: Function;
/** Should notification hide when user press on it
* @default true */
hideOnPress?: boolean;
/** How many pixels user should swipe-up notification to dismiss it
* @default 20 */
swipePixelsToClose?: number;
/** Animation easing after user finished swiping
* @default null */
swipeEasing?: (value: number) => number;
/** How fast should be animation after user finished swiping
* @default 200 */
swipeAnimationDuration?: number;
/** Time after notification will disappear. Set to `0` to not hide notification automatically
* @default 3000 */
duration?: number;
>>>>>>>
/** How fast notification will appear/disappear
* @default 300 */
animationDuration?: number;
/** How fast notification will appear.
* @default animationDuration || 300 */
showAnimationDuration?: number;
/** How fast notification will disappear.
* @default animationDuration || 300 */
hideAnimationDuration?: number;
/** Animation easing. Details: https://reactnative.dev/docs/easing
* @default null */
easing?: Animated.TimingAnimationConfig['easing'];
/** Show Animation easing.
* @default easing || null */
showEasing?: Animated.TimingAnimationConfig['easing'];
/** Hide Animation easing.
* @default easing || null */
hideEasing?: Animated.TimingAnimationConfig['easing'];
/** Function called when notification started hiding
* @default null */
onStartHiding?: Function;
/** Function called when notification completely hidden
* @default null */
onHidden?: Function;
/** Function called when user press on notification
* @default null */
onPress?: Function;
/** Should notification hide when user press on it
* @default true */
hideOnPress?: boolean;
/** How many pixels user should swipe-up notification to dismiss it
* @default 20 */
swipePixelsToClose?: number;
/** Animation easing after user finished swiping
* @default null */
swipeEasing?: Animated.TimingAnimationConfig['easing'];
/** How fast should be animation after user finished swiping
* @default 200 */
swipeAnimationDuration?: number;
/** Time after notification will disappear. Set to `0` to not hide notification automatically
* @default 3000 */
duration?: number; |
<<<<<<<
import { Component, ApplicationRef } from '@angular/core';
=======
/* tslint:disable:no-access-missing-member */
import { Component } from '@angular/core';
>>>>>>>
import { Component } from '@angular/core'; |
<<<<<<<
serviceTrie: Trie;
serviceTrieInput: string;
serviceRecommendations: string[];
requestTrie: Trie;
messageTrie: Trie;
messageRecommendations: string[];
messageTrieInput: string;
=======
configArguments: any;
configElements: any;
>>>>>>>
serviceTrie: Trie;
serviceTrieInput: string;
serviceRecommendations: string[];
requestTrie: Trie;
messageTrie: Trie;
messageRecommendations: string[];
messageTrieInput: string;
configArguments: any;
configElements: any; |
<<<<<<<
// import { RootState } from "./state";
=======
>>>>>>>
// import { RootState } from "./state";
<<<<<<<
import { RootState, Mode } from "../models/MainModel";
import * as cloneDeep from "lodash.clonedeep";
import { LeftFactory } from '../components/Left';
import {
CallType,
BaseConfig,
RequestConfig,
UnaryRequestBody,
ClientStreamRequestBody,
ServerStreamRequestBody,
BidiStreamRequestBody,
GrpcHandlerFactory,
StreamAction,
} from "../../lib/local/grpcHandlerFactory";
=======
import { TabState, Mode } from "../models/TabModel";
import * as pbActions from "../../lib/local/pbActions";
import { CallType } from "../../lib/local/grpcHandlerFactory";
import { Trie } from "../utils/trieClass";
import * as cloneDeep from "lodash.clonedeep";
<<<<<<< HEAD
import * as Types from "MyTypes";
const initialState: TabState = {
baseConfig: { grpcServerURI: "", packageDefinition: null, packageName: "", serviceName: "" },
configArguments: { arguments: {} },
configElements: { arguments: {} },
filePath: "",
messageList: {},
messageTrie: new Trie(),
messageTrieInput: "",
messageRecommendations: [],
mode: Mode.SHOW_SERVICE,
requestConfig: { requestName: "", callType: null, reqBody: {} },
requestTrie: new Trie(),
responseMetrics: "",
serviceList: {},
serviceRecommendations: [],
serverResponse: {},
selectedService: null,
selectedRequest: null,
serviceTrie: new Trie(),
serviceTrieInput: "",
=======
import { LeftFactory } from '../components/Left';
import { array } from "prop-types";
import ServiceAndRequest from '../components/ServiceAndRequest'
import Messages from '../components/Messages'
import Setup from '../components/Setup'
>>>>>>>
import { RootState, Mode } from "../models/MainModel";
import * as cloneDeep from "lodash.clonedeep";
import { LeftFactory } from '../components/Left';
import {
CallType,
BaseConfig,
RequestConfig,
UnaryRequestBody,
ClientStreamRequestBody,
ServerStreamRequestBody,
BidiStreamRequestBody,
GrpcHandlerFactory,
StreamAction,
} from "../../lib/local/grpcHandlerFactory";
import { TabState, Mode } from "../models/TabModel";
import * as pbActions from "../../lib/local/pbActions";
import { CallType } from "../../lib/local/grpcHandlerFactory";
import { Trie } from "../utils/trieClass";
import * as Types from "MyTypes";
import { array } from "prop-types";
<<<<<<<
export const mainReducer = (state: RootState = initialState, action: Types.RootAction) => {
=======
export const mainReducer = (state: TabState = initialState, action: Types.RootAction) => {
>>>>>>>
export const mainReducer = (state: RootState = initialState, action: Types.RootAction) => { |
<<<<<<<
test(
'changes the href to another bundle if strategy moved it', async () => {
const bundler = new Bundler();
// This strategy moves a file to a different bundle.
const strategy = (bundles: Bundle[]): Bundle[] => {
return [
new Bundle(
new Set(['test/html/default.html']),
new Set(['test/html/default.html'])),
new Bundle(
new Set(), //
new Set(['test/html/imports/simple-import.html']))
];
};
const manifest = await bundler.generateManifest(
['test/html/default.html'], strategy);
const documents = await bundler.bundle(manifest);
const document = documents.get('test/html/default.html')!;
assert(document);
// We've moved the 'imports/simple-import.html' into a shared bundle
// so a link to import it now points to the shared bundle instead.
const linkTag = dom5.query(
document.ast!,
preds.AND(
preds.hasTagName('link'),
preds.hasAttrValue('rel', 'import')))!;
assert(linkTag);
assert.equal(
dom5.getAttribute(linkTag, 'href'), '../../shared_bundle_1.html');
});
=======
test('changes the href to another bundle if strategy moved it', async() => {
const bundler = new Bundler();
// This strategy moves a file to a different bundle.
const strategy = (bundles: Bundle[]): Bundle[] => {
return [
new Bundle(
new Set(['test/html/default.html']),
new Set(['test/html/default.html'])),
new Bundle(
new Set(), //
new Set(['test/html/imports/simple-import.html']))
];
};
const manifest =
await bundler.generateManifest(['test/html/default.html'], strategy);
const documents = await bundler.bundle(manifest);
const document = documents.get('test/html/default.html')!;
assert(document);
// We've moved the 'imports/simple-import.html' into a shared bundle
// so a link to import it now points to the shared bundle instead.
const linkTag = dom5.query(
document.ast!,
preds.AND(
preds.hasTagName('link'), preds.hasAttrValue('rel', 'import')))!;
assert(linkTag);
assert.equal(
dom5.getAttribute(linkTag, 'href'), '../../shared_bundle_1.html');
const shared = documents.get('shared_bundle_1.html')!;
assert(shared);
assert.isOk(dom5.query(
shared.ast, dom5.predicates.hasAttrValue('id', 'my-element')));
});
test('bundle documents should not have tags added to them', async() => {
const ast = await bundle('test/html/imports/simple-import.html');
assert.isNull(dom5.query(
ast,
dom5.predicates.OR(
dom5.predicates.hasTagName('html'),
dom5.predicates.hasTagName('head'),
dom5.predicates.hasTagName('body'))));
});
>>>>>>>
test(
'changes the href to another bundle if strategy moved it', async () => {
const bundler = new Bundler();
// This strategy moves a file to a different bundle.
const strategy = (bundles: Bundle[]): Bundle[] => {
return [
new Bundle(
new Set(['test/html/default.html']),
new Set(['test/html/default.html'])),
new Bundle(
new Set(), //
new Set(['test/html/imports/simple-import.html']))
];
};
const manifest = await bundler.generateManifest(
['test/html/default.html'], strategy);
const documents = await bundler.bundle(manifest);
const document = documents.get('test/html/default.html')!;
assert(document);
// We've moved the 'imports/simple-import.html' into a shared bundle
// so a link to import it now points to the shared bundle instead.
const linkTag = dom5.query(
document.ast!,
preds.AND(
preds.hasTagName('link'),
preds.hasAttrValue('rel', 'import')))!;
assert(linkTag);
assert.equal(
dom5.getAttribute(linkTag, 'href'), '../../shared_bundle_1.html');
const shared = documents.get('shared_bundle_1.html')!;
assert(shared);
assert.isOk(dom5.query(
shared.ast, dom5.predicates.hasAttrValue('id', 'my-element')));
});
test('bundle documents should not have tags added to them', async () => {
const ast = await bundle('test/html/imports/simple-import.html');
assert.isNull(dom5.query(
ast,
dom5.predicates.OR(
dom5.predicates.hasTagName('html'),
dom5.predicates.hasTagName('head'),
dom5.predicates.hasTagName('body'))));
}); |
<<<<<<<
this.guid = gen_guid(identifier);
this._nextIndex = 1;
=======
this.guid = guid;
>>>>>>>
this._nextIndex = 1;
this.guid = guid; |
<<<<<<<
<div class="a">
<h1 class="e">Hello, <span class="f i {{-css-blocks-classnames 3 4 0 isWorld 1 2 0 3 1 2 (eq isThick 1) 1 3 4 2 1 textStyle "bold" 1 0 "italic" 1 1 "g" 0 "h" 1 "b" 2 "c" 3}}">World</span>!</h1>
<div class={{-css-blocks-classnames 1 2 0 isWorld 1 1 1 0 "d" 0 "b" 1}}>World</div>
<div class={{-css-blocks-classnames 1 2 0 isWorld 1 0 1 1 "d" 0 "b" 1}}>World</div>
<div class={{-css-blocks-classnames 1 1 0 isWorld 0 1 0 "b" 0}}>World</div>
</div>
=======
<div class="a">
<h1 class="d">Hello, <span class="e h {{-css-blocks-classnames 3 4 0 isWorld 1 2 0 3 1 2 (eq isThick 1) 1 3 4 2 1 textStyle "bold" 1 0 "italic" 1 1 "f" 0 "g" 1 "b" 2 "c" 3}}">World</span>!</h1>
<div class={{-css-blocks-classnames 1 2 0 isWorld 1 1 1 0 "e" 0 "b" 1}}>World</div>
<div class={{-css-blocks-classnames 1 2 0 isWorld 1 0 1 1 "e" 0 "b" 1}}>World</div>
<div class={{-css-blocks-classnames 1 1 0 isWorld 0 1 0 "b" 0}}>World</div>
</div>
`));
});
it("rewrites styles with block aliases", async function() {
let projectDir = fixture("styled-app");
let analyzer = new GlimmerAnalyzer({}, {}, moduleConfig);
let templatePath = fixture("styled-app/src/ui/components/with-block-aliases/template.hbs");
let result = await pipeline(projectDir, analyzer, "with-block-aliases", templatePath);
assert.deepEqual(minify(print(result.ast)), minify(`
<div class="b my-scope-alias stylesheet__world">
<h1 class="e my-header-alias">Hello, <span class="c f stylesheet__world stylesheet__world--thick {{-css-blocks-classnames 2 4 2 isThick 1 3 4 2 1 textStyle "bold" 1 0 "italic" 1 1 "g" 0 "f" 1 "my-alias-for-state" 2 "d" 3}}">World</span>!</h1>
</div>
>>>>>>>
<div class="a">
<h1 class="e">Hello, <span class="f i {{-css-blocks-classnames 3 4 0 isWorld 1 2 0 3 1 2 (eq isThick 1) 1 3 4 2 1 textStyle "bold" 1 0 "italic" 1 1 "g" 0 "h" 1 "b" 2 "c" 3}}">World</span>!</h1>
<div class={{-css-blocks-classnames 1 2 0 isWorld 1 1 1 0 "d" 0 "b" 1}}>World</div>
<div class={{-css-blocks-classnames 1 2 0 isWorld 1 0 1 1 "d" 0 "b" 1}}>World</div>
<div class={{-css-blocks-classnames 1 1 0 isWorld 0 1 0 "b" 0}}>World</div>
</div>
`));
});
it("rewrites styles with block aliases", async function() {
let projectDir = fixture("styled-app");
let analyzer = new GlimmerAnalyzer({}, {}, moduleConfig);
let templatePath = fixture("styled-app/src/ui/components/with-block-aliases/template.hbs");
let result = await pipeline(projectDir, analyzer, "with-block-aliases", templatePath);
assert.deepEqual(minify(print(result.ast)), minify(`
<div class="b my-scope-alias stylesheet__world">
<h1 class="e my-header-alias">Hello, <span class="c f stylesheet__world stylesheet__world--thick {{-css-blocks-classnames 2 4 2 isThick 1 3 4 2 1 textStyle "bold" 1 0 "italic" 1 1 "g" 0 "f" 1 "my-alias-for-state" 2 "d" 3}}">World</span>!</h1>
</div>
<<<<<<<
=======
assert.deepEqual(minify(print(result.ast)), minify(`
<div class="a {{-css-blocks-classnames 1 1 2 isLoading 1 0 "b" 0}}">
<aside class="c d g h"> </aside>
<article class="i {{-css-blocks-classnames 1 2 0 isRecommended 1 1 1 0 "e" 0 "f" 1}}"> </article>
</div>
`));
>>>>>>> |
<<<<<<<
=======
// Whether the Producer should call stop() in given tracks.
private _stopTracks: boolean;
>>>>>>>
// Whether the Producer should call stop() in given tracks.
private _stopTracks: boolean; |
<<<<<<<
import CustomButtons from "./CustomButtons";
=======
import Timer from "./Timer";
>>>>>>>
import CustomButtons from "./CustomButtons";
import Timer from "./Timer";
<<<<<<<
CustomButtons,
=======
Timer,
>>>>>>>
CustomButtons,
Timer, |
<<<<<<<
import {
ConnectClient,
EndpointCallContinue,
EndpointError,
EndpointResponseError,
EndpointValidationError,
InvalidSessionMiddleware,
login,
logout
} from "../../main/resources/META-INF/resources/frontend/Connect";
import {openDB} from "idb";
=======
import { ConnectClient, EndpointError, EndpointResponseError, EndpointValidationError } from "../../main/resources/META-INF/resources/frontend";
>>>>>>>
import {
ConnectClient,
EndpointError,
EndpointResponseError,
EndpointValidationError,
} from "../../main/resources/META-INF/resources/frontend/Connect";
import {openDB} from "idb";
<<<<<<<
describe('login', () => {
afterEach(() => fetchMock.restore());
it('should return an error on invalid credentials', async () => {
fetchMock.post('/login', { redirectUrl: '/login?error' });
const result = await login('invalid-username', 'invalid-password');
const expectedResult = {
error: true,
errorTitle: 'Incorrect username or password.',
errorMessage: 'Check that you have entered the correct username and password and try again.'
};
expect(fetchMock.calls()).to.have.lengthOf(1);
expect(result).to.deep.equal(expectedResult);
})
it('should return a CSRF token on valid credentials', async () => {
fetchMock.post('/login', {
body: 'window.Vaadin = {TypeScript: {"csrfToken":"6a60700e-852b-420f-a126-a1c61b73d1ba"}};',
redirectUrl: '/'
});
const result = await login('valid-username', 'valid-password');
const expectedResult = {
error: false,
errorTitle: '',
errorMessage: '',
token: '6a60700e-852b-420f-a126-a1c61b73d1ba'
};
expect(fetchMock.calls()).to.have.lengthOf(1);
expect(result).to.deep.equal(expectedResult);
})
it('should return an error on other unexpected responses', async () => {
const body = 'Unexpected error';
const errorResponse = new Response(
body,
{
status: 500,
statusText: 'Internal Server Error'
}
);
fetchMock.post('/login', errorResponse);
const result = await login('valid-username', 'valid-password');
const expectedResult = {
error: true,
errorTitle: 'Error',
errorMessage: 'Something went wrong when trying to login.'
};
expect(fetchMock.calls()).to.have.lengthOf(1);
expect(result).to.deep.equal(expectedResult);
})
})
});
describe("logout", () => {
it('should set the csrf token on logout', async () => {
fetchMock.get('/logout', {
body: 'window.Vaadin = {TypeScript: {"csrfToken":"6a60700e-852b-420f-a126-a1c61b73d1ba"}};',
redirectUrl: '/logout?login'
});
await logout();
expect(fetchMock.calls()).to.have.lengthOf(1);
expect((window as any).Vaadin.TypeScript.csrfToken).to.equal("6a60700e-852b-420f-a126-a1c61b73d1ba");
});
});
describe("InvalidSessionMiddleWare", ()=>{
afterEach(() => fetchMock.restore());
it("should invoke the onInvalidSession callback on 401 response", async ()=>{
fetchMock.post(base + '/connect/FooEndpoint/fooMethod', 401)
const invalidSessionCallback = sinon.spy((continueFunc: EndpointCallContinue)=>{
// mock to pass authentication
fetchMock.restore();
fetchMock.post(base + '/connect/FooEndpoint/fooMethod', {fooData: 'foo'})
continueFunc("csrf-token");
});
const middleware = new InvalidSessionMiddleware(invalidSessionCallback);
const client = new ConnectClient({middlewares:[middleware]});
await client.call('FooEndpoint','fooMethod');
expect(invalidSessionCallback.calledOnce).to.be.true;
const headers = fetchMock.lastOptions().headers;
expect(headers).to.deep.include({
'x-csrf-token': 'csrf-token'
});
})
it("should not invoke the onInvalidSession callback on 200 response", async ()=>{
fetchMock.post(base + '/connect/FooEndpoint/fooMethod', {fooData: 'foo'})
const invalidSessionCallback = sinon.spy();
const middleware = new InvalidSessionMiddleware(invalidSessionCallback);
const client = new ConnectClient({middlewares:[middleware]});
await client.call('FooEndpoint', 'fooMethod');
expect(invalidSessionCallback.called).to.be.false;
})
=======
>>>>>>> |
<<<<<<<
networks?: string[];
=======
row: number;
column: number;
rowLength: number;
children: NodeChild;
>>>>>>>
networks?: string[];
row: number;
column: number;
rowLength: number;
children: NodeChild;
<<<<<<<
export type Roots = {
[service: string]: boolean | number;
};
export type Networks = {
[network: string]: any;
=======
export type NodesObject = {
[service: string]: SNode;
};
export type TreeMap = {
[row: string]: string[];
>>>>>>>
export type NodesObject = {
[service: string]: SNode;
};
export type TreeMap = {
[row: string]: string[];
};
export type Networks = {
[network: string]: any; |
<<<<<<<
/**
* Gets the last block on the blockchain.
*/
getLastBlock (): Promise<Block>;
=======
/**
* Gets Sidetree transactions in chronological order.
* The function call may not return all known transactions, moreTransaction indicates if there are more transactions to be fetched.
* When afterTransaction is not given, Sidetree transactions starting from inception will be returned.
* When afterTransaction is given, only Sidetree transaction after the given transaction will be returned.
* @param afterTransaction A valid Sidetree transaction number.
*/
read (afterTransaction?: number): Promise<{ moreTransactions: boolean, transactions: Transaction[] }>;
/**
* Gets the last block on the blockchain.
*/
getLastBlock (): Promise<Block>;
>>>>>>>
/**
* Gets Sidetree transactions in chronological order.
* The function call may not return all known transactions, moreTransaction indicates if there are more transactions to be fetched.
* When afterTransaction is not given, Sidetree transactions starting from inception will be returned.
* When afterTransaction is given, only Sidetree transaction after the given transaction will be returned.
* @param afterTransaction A valid Sidetree transaction number.
*/
read (afterTransaction?: number): Promise<{ moreTransactions: boolean, transactions: Transaction[] }>;
/**
* Gets the last block on the blockchain.
*/
getLastBlock (): Promise<Block>;
<<<<<<<
public constructor (public uri: string) {
this.blocksUri = `${uri}/blocks`;
}
=======
/** URI that handles transaction operations. */
private transactionsUri: string; // e.g. https://127.0.0.1/transactions
private blocksUri: string; // e.g. https://127.0.0.1/blocks
public constructor (public uri: string) {
this.transactionsUri = `${uri}/transactions`;
this.blocksUri = `${uri}/blocks`;
}
>>>>>>>
public constructor (public uri: string) {
this.transactionsUri = `${uri}/transactions`;
this.blocksUri = `${uri}/blocks`;
}
<<<<<<<
// TODO: Consider caching strategy since this will be invoked very frequently, especially by the Rooter.
public async getLastBlock (): Promise<Block> {
const uri = `${this.blocksUri}/last`; // e.g. https://127.0.0.1/blocks/last
const response = await nodeFetch(uri);
if (response.status !== HttpStatus.OK) {
throw new Error('Encountered an error fetching last block data from blockchain.');
}
const responseBodyString = (response.body.read() as Buffer).toString();
const responseBody = JSON.parse(responseBodyString);
return responseBody;
}
=======
public async read (afterTransaction?: number): Promise<{ moreTransactions: boolean, transactions: Transaction[]}> {
let afterQueryParameter = '';
if (afterTransaction) {
afterQueryParameter = `?after=${afterTransaction}`;
}
const readUri = this.transactionsUri + afterQueryParameter; // e.g. https://127.0.0.1/transactions?after=23
const requestParameters = {
method: 'get',
headers: { 'Content-Type': 'application/json' }
};
const response = await nodeFetch(readUri, requestParameters);
if (response.status !== HttpStatus.OK) {
throw new Error('Encountered an error fetching Sidetree transactions from blockchain.');
}
const responseBodyString = (response.body.read() as Buffer).toString();
const responseBody = JSON.parse(responseBodyString);
return responseBody;
}
// TODO: Consider caching strategy since this will be invoked very frequently, especially by the Rooter.
public async getLastBlock (): Promise<Block> {
const uri = `${this.blocksUri}/last`; // e.g. https://127.0.0.1/blocks/last
const response = await nodeFetch(uri);
if (response.status !== HttpStatus.OK) {
throw new Error('Encountered an error fetching last block data from blockchain.');
}
const responseBodyString = (response.body.read() as Buffer).toString();
const responseBody = JSON.parse(responseBodyString);
return responseBody;
}
>>>>>>>
public async read (afterTransaction?: number): Promise<{ moreTransactions: boolean, transactions: Transaction[]}> {
let afterQueryParameter = '';
if (afterTransaction) {
afterQueryParameter = `?after=${afterTransaction}`;
}
const readUri = this.transactionsUri + afterQueryParameter; // e.g. https://127.0.0.1/transactions?after=23
const requestParameters = {
method: 'get',
headers: { 'Content-Type': 'application/json' }
};
const response = await nodeFetch(readUri, requestParameters);
if (response.status !== HttpStatus.OK) {
throw new Error('Encountered an error fetching Sidetree transactions from blockchain.');
}
const responseBodyString = (response.body.read() as Buffer).toString();
const responseBody = JSON.parse(responseBodyString);
return responseBody;
}
// TODO: Consider caching strategy since this will be invoked very frequently, especially by the Rooter.
public async getLastBlock (): Promise<Block> {
const uri = `${this.blocksUri}/last`; // e.g. https://127.0.0.1/blocks/last
const response = await nodeFetch(uri);
if (response.status !== HttpStatus.OK) {
throw new Error('Encountered an error fetching last block data from blockchain.');
}
const responseBodyString = (response.body.read() as Buffer).toString();
const responseBody = JSON.parse(responseBodyString);
return responseBody;
} |
<<<<<<<
let operationProcessor = createOperationProcessor(cas, 'did:sidetree:');
let createOp: WriteOperation | undefined;
=======
let operationProcessor = createOperationProcessor(cas, didMethodName);
let createOp;
>>>>>>>
let operationProcessor = createOperationProcessor(cas, didMethodName);
let createOp: WriteOperation | undefined;
<<<<<<<
operationProcessor = createOperationProcessor(cas, 'did:sidetree:'); // TODO: add a clear method to avoid double initialization.
createOp = await addBatchFileOfOneOperationToCas(createCreateOperationBuffer(), cas, 0, 0, 0);
=======
operationProcessor = createOperationProcessor(cas, didMethodName); // TODO: add a clear method to avoid double initialization.
createOp = await addBatchOfOneOperation(createCreateOperationBuffer(), cas, 0, 0);
>>>>>>>
operationProcessor = createOperationProcessor(cas, didMethodName); // TODO: add a clear method to avoid double initialization.
createOp = await addBatchFileOfOneOperationToCas(createCreateOperationBuffer(), cas, 0, 0, 0);
<<<<<<<
it('should return provided document for resolve(firstVersion)', async () => {
const resolvedDid = await operationProcessor.resolve(firstVersion!);
=======
it('should return a DID Document for resolve(did) for a registered DID', async () => {
const did = `${didMethodName}${firstVersion!}`;
const didDocument = await operationProcessor.resolve(did);
>>>>>>>
it('should return a DID Document for resolve(did) for a registered DID', async () => {
const did = `${didMethodName}${firstVersion!}`;
const didDocument = await operationProcessor.resolve(did); |
<<<<<<<
=======
let isAzure = false;
>>>>>>> |
<<<<<<<
draggable: boolean;
=======
resizeColumn: boolean;
>>>>>>>
resizeColumn: boolean;
draggable: boolean; |
<<<<<<<
public schemaDefinitionResolver!: SchemaDefinitionResolver;
public maxInlinedParameters!: number;
=======
public schemaDefinitionResolver: SchemaDefinitionResolver;
>>>>>>>
public schemaDefinitionResolver!: SchemaDefinitionResolver;
<<<<<<<
const value = await this.state.getValue(key);
return value !== null ? <T>value : defaultValue;
=======
if (defaultValue === undefined && value === null) {
throw new Error(`No value for configuration key '${key}' was provided`);
}
return <T>(value !== null ? value : defaultValue);
>>>>>>>
if (defaultValue === undefined && value === null) {
throw new Error(`No value for configuration key '${key}' was provided`);
}
return <T>(value !== null ? value : defaultValue); |
<<<<<<<
// Syndicate Pirate Raids hook. If it is in effect, then only the syndicate pirate raider will
// retrieve their fleets.
// See Colony.ts for the other half of this effect, and Game.ts which disables it.
if (this.game.syndicatePirateRaider === undefined) {
this.tradesThisTurn = 0;
} else if (this.game.syndicatePirateRaider === this.id) {
this.tradesThisTurn = 0;
}
=======
this.tradesThisGeneration = 0;
>>>>>>>
// Syndicate Pirate Raids hook. If it is in effect, then only the syndicate pirate raider will
// retrieve their fleets.
// See Colony.ts for the other half of this effect, and Game.ts which disables it.
if (this.game.syndicatePirateRaider === undefined) {
this.tradesThisGeneration = 0;
} else if (this.game.syndicatePirateRaider === this.id) {
this.tradesThisGeneration = 0;
} |
<<<<<<<
public play(player: Player) {
player.victoryPoints++;
=======
public play(player: Player, _game: Game) {
>>>>>>>
public play(player: Player) { |
<<<<<<<
it('Should play', function() {
expect(card.canPlay(player)).is.true;
=======
it('Works in solo mode', function() {
game = Game.newInstance('foobar', [player], player);
expect(card.canPlay()).is.true;
expect(card.play(player, game)).is.undefined;
expect(game.someoneHasRemovedOtherPlayersPlants).is.true;
>>>>>>>
it('Works in solo mode', function() {
game = Game.newInstance('foobar', [player], player);
expect(card.canPlay(player)).is.true;
expect(card.play(player, game)).is.undefined;
expect(game.someoneHasRemovedOtherPlayersPlants).is.true; |
<<<<<<<
private useTurmoilExtension: boolean = false;
constructor(usePreludeExtension: boolean, useVenusNextExtension: boolean, useColoniesNextExtension: boolean, useTurmoilExtension: boolean, _seed?: number) {
=======
private usePromoCards: boolean = false;
constructor(usePreludeExtension: boolean, useVenusNextExtension: boolean, useColoniesNextExtension : boolean, usePromoCards: boolean, _seed?: number) {
>>>>>>>
private usePromoCards: boolean = false;
private useTurmoilExtension: boolean = false;
constructor(usePreludeExtension: boolean, useVenusNextExtension: boolean, useColoniesNextExtension : boolean, usePromoCards: boolean, useTurmoilExtension: boolean, _seed?: number) {
<<<<<<<
this.useTurmoilExtension = useTurmoilExtension;
=======
this.usePromoCards = usePromoCards;
>>>>>>>
this.usePromoCards = usePromoCards;
this.useTurmoilExtension = useTurmoilExtension;
<<<<<<<
if (this.useTurmoilExtension) {
this.deck.push(...ALL_TURMOIL_PROJECTS_CARDS.map((cf) => new cf.factory()));
this.deck = this.shuffleCards<IProjectCard>(this.deck);
}
=======
if (this.usePromoCards) {
this.deck.push(...ALL_PROMO_PROJECTS_CARDS.map((cf) => new cf.factory()));
this.deck = this.shuffleCards<IProjectCard>(this.deck);
}
>>>>>>>
if (this.useTurmoilExtension) {
this.deck.push(...ALL_TURMOIL_PROJECTS_CARDS.map((cf) => new cf.factory()));
this.deck = this.shuffleCards<IProjectCard>(this.deck);
}
if (this.usePromoCards) {
this.deck.push(...ALL_PROMO_PROJECTS_CARDS.map((cf) => new cf.factory()));
this.deck = this.shuffleCards<IProjectCard>(this.deck);
} |
<<<<<<<
private generationPlayed: Map<CardName, number> = new Map();
=======
>>>>>>>
<<<<<<<
generationPlayed: Array.from(this.generationPlayed),
=======
// TODO(kberg): Recast to Map<CardName, number>, make sure it survives JSONification.
>>>>>>>
<<<<<<<
// Rebuild generation played map
player.generationPlayed = new Map(d.generationPlayed);
=======
>>>>>>> |
<<<<<<<
=======
import {GlobalParameter} from '../../GlobalParameter';
import {Units} from '../../Units';
>>>>>>>
import {Units} from '../../Units'; |
<<<<<<<
rulingParty: undefined | IParty | PartyName;
dominantParty: undefined | IParty | PartyName;
=======
rulingParty: IParty;
dominantParty: IParty;
>>>>>>>
rulingParty: IParty | PartyName;
dominantParty: IParty | PartyName; |
<<<<<<<
import { Astrodrill } from "./cards/promo/Astrodrill";
=======
import { AsteroidHollowing } from "./cards/promo/AsteroidHollowing";
import { DeimosDownPromo } from "./cards/promo/DeimosDownPromo";
import { GreatDamPromo } from "./cards/promo/GreatDamPromo";
import { MagneticFieldGeneratorsPromo } from "./cards/promo/MagneticFieldGeneratorsPromo";
>>>>>>>
import { Astrodrill } from "./cards/promo/Astrodrill";
import { AsteroidHollowing } from "./cards/promo/AsteroidHollowing";
import { DeimosDownPromo } from "./cards/promo/DeimosDownPromo";
import { GreatDamPromo } from "./cards/promo/GreatDamPromo";
import { MagneticFieldGeneratorsPromo } from "./cards/promo/MagneticFieldGeneratorsPromo"; |
<<<<<<<
import {TestingUtils, setCustomGameOptions, TestPlayers} from './TestingUtils';
=======
import {maxOutOceans, setCustomGameOptions} from './TestingUtils';
import {TestPlayers} from './TestPlayers';
>>>>>>>
import {TestingUtils, setCustomGameOptions} from './TestingUtils';
import {TestPlayers} from './TestPlayers'; |
<<<<<<<
// {cardName: CardName.TEMPEST_CONSULTANCY, Factory: TempestConsultancy, compatibility: GameModule.Turmoil},
{cardName: CardName.THE_DARKSIDE_OF_THE_MOON_SYNDICATE, Factory: TheDarksideofTheMoonSyndicate},
=======
// {cardName: CardName.THE_DARKSIDE_OF_THE_MOON_SYNDICATE, Factory: TheDarksideofTheMoonSyndicate},
>>>>>>>
{cardName: CardName.THE_DARKSIDE_OF_THE_MOON_SYNDICATE, Factory: TheDarksideofTheMoonSyndicate}, |
<<<<<<<
card.play(player, game); // can decrease own production
const input = game.deferredActions.peek()!.execute();
=======
card.play(player); // can decrease own production
const input = game.deferredActions.next()!.execute();
>>>>>>>
card.play(player); // can decrease own production
const input = game.deferredActions.peek()!.execute(); |
<<<<<<<
import { AsteroidHollowing } from "./cards/promo/AsteroidHollowing";
=======
import { DeimosDownPromo } from "./cards/promo/DeimosDownPromo";
import { GreatDamPromo } from "./cards/promo/GreatDamPromo";
import { MagneticFieldGeneratorsPromo } from "./cards/promo/MagneticFieldGeneratorsPromo";
>>>>>>>
import { AsteroidHollowing } from "./cards/promo/AsteroidHollowing";
import { DeimosDownPromo } from "./cards/promo/DeimosDownPromo";
import { GreatDamPromo } from "./cards/promo/GreatDamPromo";
import { MagneticFieldGeneratorsPromo } from "./cards/promo/MagneticFieldGeneratorsPromo";
<<<<<<<
{ cardName: CardName.STANFORD_TORUS, factory: StanfordTorus },
{ cardName: CardName.ASTEROID_HOLLOWING, factory: AsteroidHollowing }
=======
{ cardName: CardName.STANFORD_TORUS, factory: StanfordTorus },
{ cardName: CardName.DEIMOS_DOWN_PROMO, factory: DeimosDownPromo },
{ cardName: CardName.GREAT_DAM_PROMO, factory: GreatDamPromo },
{ cardName: CardName.MAGNETIC_FIELD_GENERATORS_PROMO, factory: MagneticFieldGeneratorsPromo }
>>>>>>>
{ cardName: CardName.STANFORD_TORUS, factory: StanfordTorus },
{ cardName: CardName.ASTEROID_HOLLOWING, factory: AsteroidHollowing }
{ cardName: CardName.DEIMOS_DOWN_PROMO, factory: DeimosDownPromo },
{ cardName: CardName.GREAT_DAM_PROMO, factory: GreatDamPromo },
{ cardName: CardName.MAGNETIC_FIELD_GENERATORS_PROMO, factory: MagneticFieldGeneratorsPromo } |
<<<<<<<
import {Capital} from '../../../src/cards/Capital';
import {TestPlayers} from '../../TestingUtils';
=======
import {Capital} from '../../../src/cards/base/Capital';
>>>>>>>
import {TestPlayers} from '../../TestingUtils';
import {Capital} from '../../../src/cards/base/Capital'; |
<<<<<<<
import { Card } from "./card/Card";
import {
ALL_PRELUDE_PROJECTS_CARDS,
ALL_VENUS_PROJECTS_CARDS,
ALL_COLONIES_PROJECTS_CARDS,
ALL_TURMOIL_PROJECTS_CARDS,
ALL_PROMO_PROJECTS_CARDS,
ALL_PROJECT_CARDS,
ALL_CORP_ERA_PROJECT_CARDS,
ALL_CORPORATION_CARDS,
ALL_CORP_ERA_CORPORATION_CARDS,
ALL_VENUS_CORPORATIONS,
ALL_PRELUDE_CORPORATIONS,
ALL_COLONIES_CORPORATIONS,
ALL_TURMOIL_CORPORATIONS,
ALL_PROMO_CORPORATIONS,
ALL_COMMUNITY_CORPORATIONS,
ALL_PRELUDE_CARDS,
ALL_COMMUNITY_PRELUDE_CARDS,
ALL_COMMUNITY_VENUS_PRELUDE_CARDS,
ALL_COMMUNITY_COLONY_PRELUDE_CARDS,
ALL_COMMUNITY_TURMOIL_PRELUDE_CARDS,
} from "../Dealer";
=======
import { Card } from "./Card";
>>>>>>>
import { Card } from "./card/Card"; |
<<<<<<<
customCorporationsList: Array<CardName>
=======
customCorporationsList: boolean,
corporations: Array<CardName>,
solarPhaseOption: boolean
>>>>>>>
customCorporationsList: Array<CardName>;
solarPhaseOption: boolean;
<<<<<<<
customCorporationsList: []
=======
customCorporationsList: false,
corporations: [],
solarPhaseOption: false
>>>>>>>
customCorporationsList: [],
solarPhaseOption: false |
<<<<<<<
=======
const card = new GiantSolarShade();
const player = TestPlayers.BLUE.newPlayer();
const redPlayer = TestPlayers.RED.newPlayer();
const game = Game.newInstance('foobar', [player, redPlayer], player);
>>>>>>>
<<<<<<<
game.turmoil!.rulingParty = new Reds();
PoliticalAgendas.setNextAgenda(game.turmoil!, game);
const card = new GiantSolarShade();
player.megaCredits = 27;
expect(card.canPlay(player, game)).is.not.true;
player.playedCards.push(new Dirigibles());
player.addResourceTo(player.playedCards[0], 3);
expect(card.canPlay(player, game)).is.true;
=======
const player = TestPlayers.BLUE.newPlayer();
const gameOptions = setCustomGameOptions();
const game = Game.newInstance('foobar', [player], player, gameOptions);
game.turmoil!.rulingParty = new Reds();
const card = new GiantSolarShade();
player.megaCredits = 27;
expect(card.canPlay(player, game)).is.not.true;
player.playedCards.push(new Dirigibles());
player.addResourceTo(player.playedCards[0], 3);
expect(card.canPlay(player, game)).is.true;
>>>>>>>
game.turmoil!.rulingParty = new Reds();
PoliticalAgendas.setNextAgenda(game.turmoil!, game);
player.megaCredits = 27;
expect(card.canPlay(player, game)).is.not.true;
player.playedCards.push(new Dirigibles());
player.addResourceTo(player.playedCards[0], 3);
expect(card.canPlay(player, game)).is.true; |
<<<<<<<
export class WavePower implements IProjectCard {
public tags = [Tags.ENERGY];
public cost = 8;
public name = CardName.WAVE_POWER;
public cardType = CardType.AUTOMATED;
public canPlay(player: Player, game: Game): boolean {
return game.checkMinRequirements(player, GlobalParameter.OCEANS, 3);
}
public play(player: Player) {
player.addProduction(Resources.ENERGY);
return undefined;
}
public getVictoryPoints() {
return 1;
}
public metadata: CardMetadata = {
cardNumber: '139',
requirements: CardRequirements.builder((b) => b.oceans(3)),
renderData: CardRenderer.builder((b) => {
b.production((pb) => pb.energy(1));
}),
description: 'Requires 3 ocean tiles. Increase your energy production 1 step.',
victoryPoints: 1,
}
=======
export class WavePower extends Card implements IProjectCard {
constructor() {
super({
cardType: CardType.AUTOMATED,
name: CardName.WAVE_POWER,
tags: [Tags.ENERGY],
cost: 8,
metadata: {
cardNumber: '139',
requirements: CardRequirements.builder((b) => b.oceans(3)),
renderData: CardRenderer.builder((b) => {
b.productionBox((pb) => pb.energy(1));
}),
description: 'Requires 3 ocean tiles. Increase your energy production 1 step.',
victoryPoints: 1,
},
});
}
public canPlay(player: Player, game: Game): boolean {
return game.checkMinRequirements(player, GlobalParameter.OCEANS, 3);
}
public play(player: Player) {
player.addProduction(Resources.ENERGY);
return undefined;
}
public getVictoryPoints() {
return 1;
}
>>>>>>>
export class WavePower extends Card implements IProjectCard {
constructor() {
super({
cardType: CardType.AUTOMATED,
name: CardName.WAVE_POWER,
tags: [Tags.ENERGY],
cost: 8,
metadata: {
cardNumber: '139',
requirements: CardRequirements.builder((b) => b.oceans(3)),
renderData: CardRenderer.builder((b) => {
b.production((pb) => pb.energy(1));
}),
description: 'Requires 3 ocean tiles. Increase your energy production 1 step.',
victoryPoints: 1,
},
});
}
public canPlay(player: Player, game: Game): boolean {
return game.checkMinRequirements(player, GlobalParameter.OCEANS, 3);
}
public play(player: Player) {
player.addProduction(Resources.ENERGY);
return undefined;
}
public getVictoryPoints() {
return 1;
} |
<<<<<<<
player.addResourceTo(this);
=======
this.resourceCount++;
LogHelper.logAddResource(game, player, this);
>>>>>>>
player.addResourceTo(this);
LogHelper.logAddResource(game, player, this);
<<<<<<<
player.addResourceTo(this);
=======
this.resourceCount++;
LogHelper.logAddResource(game, player, this);
>>>>>>>
player.addResourceTo(this);
LogHelper.logAddResource(game, player, this); |
<<<<<<<
import {SerializedPoliticalAgendasData} from './PoliticalAgendas';
=======
import {NeutralPlayer} from './Turmoil';
import {PlayerId} from '../Player';
>>>>>>>
import {SerializedPoliticalAgendasData} from './PoliticalAgendas';
import {NeutralPlayer} from './Turmoil';
import {PlayerId} from '../Player'; |
<<<<<<<
import {TurmoilPolicy} from './turmoil/TurmoilPolicy';
=======
import {CardLoader} from './CardLoader';
>>>>>>>
import {TurmoilPolicy} from './turmoil/TurmoilPolicy';
import {CardLoader} from './CardLoader';
<<<<<<<
this.turmoil = Turmoil.newInstance(this, gameOptions.politicalAgendasExtension);
=======
game.turmoil = Turmoil.newInstance(game);
>>>>>>>
game.turmoil = Turmoil.newInstance(game, gameOptions.politicalAgendasExtension); |
<<<<<<<
public name = CardName.RESTRICTED_AREA_ARES;
public adjacencyBonus: IAdjacencyBonus = {bonus: [SpaceBonus.DRAW_CARD]};
public metadata: CardMetadata = {
cardNumber: 'A24',
renderData: CardRenderer.builder((b) => {
b.action('Spend 2 MC to draw a card.', (eb) => {
eb.megacredits(2).startAction.cards(1);
}).br;
b.tile(TileType.RESTRICTED_AREA, false, true);
}),
description: 'Place this tile which grants an ADJACENCY BONUS of 1 card.',
=======
constructor() {
super(
CardName.RESTRICTED_AREA_ARES,
{bonus: [SpaceBonus.DRAW_CARD]},
{
cardNumber: 'A24',
renderData: CardRenderer.builder((b) => {
b.effectBox((eb) => {
eb.megacredits(2).startAction.cards(1);
eb.description('Action: Spend 2 MC to draw a card.');
}).br;
b.tile(TileType.RESTRICTED_AREA, false, true);
}),
description: 'Place this tile which grants an ADJACENCY BONUS of 1 card.',
});
>>>>>>>
constructor() {
super(
CardName.RESTRICTED_AREA_ARES,
{bonus: [SpaceBonus.DRAW_CARD]},
{
cardNumber: 'A24',
renderData: CardRenderer.builder((b) => {
b.action('Spend 2 MC to draw a card.', (eb) => {
eb.megacredits(2).startAction.cards(1);
}).br;
b.tile(TileType.RESTRICTED_AREA, false, true);
}),
description: 'Place this tile which grants an ADJACENCY BONUS of 1 card.',
}); |
<<<<<<<
import { CardType } from "./cards/CardType";
=======
import { ColonyModel } from "./models/ColonyModel";
>>>>>>>
import { CardType } from "./cards/CardType";
import { ColonyModel } from "./models/ColonyModel"; |
<<<<<<<
const { solution, options } = action.payload
// If the solution options show it as untrusted, but the newly-received options set untrusted to false,
// go ahead and dismiss the message bar.
if (solution.options.isUntrusted && options.isUntrusted === false) {
yield put(messageBar.dismiss())
=======
const { solution, options } = action.payload;
if (!options.isUntrusted) {
yield put(messageBar.dismiss());
>>>>>>>
const { solution, options } = action.payload;
// If the solution options show it as untrusted, but the newly-received options set untrusted to false,
// go ahead and dismiss the message bar.
if (solution.options.isUntrusted && options.isUntrusted === false) {
yield put(messageBar.dismiss()); |
<<<<<<<
{cardName: CardName.THE_GRAND_LUNA_CAPITAL_GROUP, Factory: TheGrandLunaCapitalGroup},
// {cardName: CardName.INTRAGEN_SANCTUARY_HEADQUARTERS, Factory: IntragenSanctuaryHeadquarters},
=======
// {cardName: CardName.THE_GRAND_LUNA_CAPITAL_GROUP, Factory: TheGrandLunaCapitalGroup},
{cardName: CardName.INTRAGEN_SANCTUARY_HEADQUARTERS, Factory: IntragenSanctuaryHeadquarters},
>>>>>>>
{cardName: CardName.THE_GRAND_LUNA_CAPITAL_GROUP, Factory: TheGrandLunaCapitalGroup},
{cardName: CardName.INTRAGEN_SANCTUARY_HEADQUARTERS, Factory: IntragenSanctuaryHeadquarters}, |
<<<<<<<
if (this.canUseMicrobesAsMegaCreditsForPlants && howToPay.microbes !== undefined) {
totalToPay += howToPay.microbes * 2;
}
=======
if (howToPay.megaCredits > this.megaCredits) {
throw "Do not have enough mega credits";
}
>>>>>>>
if (this.canUseMicrobesAsMegaCreditsForPlants && howToPay.microbes !== undefined) {
totalToPay += howToPay.microbes * 2;
if (howToPay.megaCredits > this.megaCredits) {
throw "Do not have enough mega credits";
} |
<<<<<<<
} else if (type === TileType.GREAT_DAM) {
classes.push('card-tile-symbol-great-dam');
=======
} else if (type === TileType.ECOLOGICAL_ZONE) {
classes.push('card-tile-symbol-ecological-zone');
>>>>>>>
} else if (type === TileType.GREAT_DAM) {
classes.push('card-tile-symbol-great-dam');
} else if (type === TileType.ECOLOGICAL_ZONE) {
classes.push('card-tile-symbol-ecological-zone'); |
<<<<<<<
import {TurmoilHandler} from './turmoil/TurmoilHandler';
import {TurmoilPolicy} from './turmoil/TurmoilPolicy';
=======
import {StandardProjectCard} from './cards/standardProjects/StandardProjectCard';
import {GameLoader} from './database/GameLoader';
import {CardLoader} from './CardLoader';
>>>>>>>
import {TurmoilHandler} from './turmoil/TurmoilHandler';
import {TurmoilPolicy} from './turmoil/TurmoilPolicy';
import {StandardProjectCard} from './cards/standardProjects/StandardProjectCard';
import {GameLoader} from './database/GameLoader';
import {CardLoader} from './CardLoader';
<<<<<<<
turmoilPolicyActionUsed: this.turmoilPolicyActionUsed,
politicalAgendasActionUsedCount: this.politicalAgendasActionUsedCount,
hasTurmoilScienceTagBonus: this.hasTurmoilScienceTagBonus,
powerPlantCost: this.powerPlantCost,
=======
turmoilScientistsActionUsed: this.turmoilScientistsActionUsed,
>>>>>>>
turmoilPolicyActionUsed: this.turmoilPolicyActionUsed,
politicalAgendasActionUsedCount: this.politicalAgendasActionUsedCount,
hasTurmoilScienceTagBonus: this.hasTurmoilScienceTagBonus, |
<<<<<<<
card.play(player, game);
const input = game.deferredActions.peek()!.execute();
=======
card.play(player);
const input = game.deferredActions.next()!.execute();
>>>>>>>
card.play(player);
const input = game.deferredActions.peek()!.execute(); |
<<<<<<<
import {Player} from '../Player';
import {Game} from '../Game';
=======
import {Units} from '../Units';
>>>>>>>
import {Player} from '../Player';
import {Game} from '../Game';
import {Units} from '../Units';
<<<<<<<
public canPlay(player: Player, _game?: Game) {
if (this.properties.metadata.requirements === undefined) {
return true;
}
return this.properties.metadata.requirements.satisfies(player);
}
=======
public get productionDelta() {
return this.properties.productionDelta;
}
>>>>>>>
public get productionDelta() {
return this.properties.productionDelta;
}
public canPlay(player: Player, _game?: Game) {
if (this.properties.metadata.requirements === undefined) {
return true;
}
return this.properties.metadata.requirements.satisfies(player);
} |
<<<<<<<
import {Bonus} from '../Bonus';
import {Policy} from '../Policy';
=======
import {PlayerId} from '../../Player';
import {NeutralPlayer} from '../Turmoil';
>>>>>>>
import {Bonus} from '../Bonus';
import {Policy} from '../Policy';
import {PlayerId} from '../../Player';
import {NeutralPlayer} from '../Turmoil';
<<<<<<<
description: string; // TODO(kberg): fetch description from agenda.
delegates: Array<PlayerId | 'NEUTRAL'>;
partyLeader: undefined | PlayerId | 'NEUTRAL';
sendDelegate: (playerId: PlayerId | 'NEUTRAL', game: Game) => void;
removeDelegate: (playerId: PlayerId | 'NEUTRAL', game: Game) => void;
bonuses: Array<Bonus>;
policies: Array<Policy>;
getPresentPlayers(): Array<PlayerId | 'NEUTRAL'>;
getDelegates:(player: PlayerId | 'NEUTRAL') => number;
=======
description: string;
delegates: Array<PlayerId | NeutralPlayer>;
partyLeader: undefined | PlayerId | NeutralPlayer;
sendDelegate: (playerId: PlayerId | NeutralPlayer, game: Game) => void;
removeDelegate: (playerId: PlayerId | NeutralPlayer, game: Game) => void;
rulingBonus: (game: Game) => void;
getPresentPlayers(): Array<PlayerId | NeutralPlayer>;
getDelegates:(player: PlayerId | NeutralPlayer) => number;
>>>>>>>
description: string; // TODO(kberg): fetch description from agenda.
delegates: Array<PlayerId | NeutralPlayer>;
partyLeader: undefined | PlayerId | NeutralPlayer;
sendDelegate: (playerId: PlayerId | NeutralPlayer, game: Game) => void;
removeDelegate: (playerId: PlayerId | NeutralPlayer, game: Game) => void;
bonuses: Array<Bonus>;
policies: Array<Policy>;
getPresentPlayers(): Array<PlayerId | NeutralPlayer>;
getDelegates:(player: PlayerId | NeutralPlayer) => number; |
<<<<<<<
// import {TheArchaicFoundationInstitute} from './TheArchaicFoundationInstitute';
import {TheDarksideofTheMoonSyndicate} from './TheDarksideofTheMoonSyndicate';
import {TheGrandLunaCapitalGroup} from './TheGrandLunaCapitalGroup';
=======
import {TheArchaicFoundationInstitute} from './TheArchaicFoundationInstitute';
import {TheDarksideofTheMoonSyndicate} from './TheDarksideofTheMoonSyndicate';
>>>>>>>
import {TheArchaicFoundationInstitute} from './TheArchaicFoundationInstitute';
import {TheDarksideofTheMoonSyndicate} from './TheDarksideofTheMoonSyndicate';
import {TheGrandLunaCapitalGroup} from './TheGrandLunaCapitalGroup';
<<<<<<<
{cardName: CardName.THE_DARKSIDE_OF_THE_MOON_SYNDICATE, Factory: TheDarksideofTheMoonSyndicate},
// {cardName: CardName.LUNA_HYPERLOOP_CORPORATION, Factory: LunaHyperloopCorporation},
// {cardName: CardName.CRESCENT_RESEARCH_ASSOCIATION, Factory: CrescentResearchAssociation},
// {cardName: CardName.LUNA_FIRST_INCORPORATED, Factory: LunaFirstIncorporated},
{cardName: CardName.THE_GRAND_LUNA_CAPITAL_GROUP, Factory: TheGrandLunaCapitalGroup},
=======
{cardName: CardName.TEMPEST_CONSULTANCY, Factory: TempestConsultancy, compatibility: GameModule.Turmoil},
{cardName: CardName.THE_DARKSIDE_OF_THE_MOON_SYNDICATE, Factory: TheDarksideofTheMoonSyndicate},
{cardName: CardName.LUNA_HYPERLOOP_CORPORATION, Factory: LunaHyperloopCorporation},
{cardName: CardName.CRESCENT_RESEARCH_ASSOCIATION, Factory: CrescentResearchAssociation},
{cardName: CardName.LUNA_FIRST_INCORPORATED, Factory: LunaFirstIncorporated},
// {cardName: CardName.THE_GRAND_LUNA_CAPITAL_GROUP, Factory: TheGrandLunaCapitalGroup},
>>>>>>>
{cardName: CardName.TEMPEST_CONSULTANCY, Factory: TempestConsultancy, compatibility: GameModule.Turmoil},
{cardName: CardName.THE_DARKSIDE_OF_THE_MOON_SYNDICATE, Factory: TheDarksideofTheMoonSyndicate},
{cardName: CardName.LUNA_HYPERLOOP_CORPORATION, Factory: LunaHyperloopCorporation},
{cardName: CardName.CRESCENT_RESEARCH_ASSOCIATION, Factory: CrescentResearchAssociation},
{cardName: CardName.LUNA_FIRST_INCORPORATED, Factory: LunaFirstIncorporated},
{cardName: CardName.THE_GRAND_LUNA_CAPITAL_GROUP, Factory: TheGrandLunaCapitalGroup}, |
<<<<<<<
public play(player: Player) {
player.game.defer(new DiscardCards(player));
player.game.defer(DrawCards.keepAll(player, 3));
const otherPlayers = player.game.getPlayers().filter((p) => p.id !== player.id);
=======
public play(player: Player, game: Game) {
game.defer(new DiscardCards(player), Priority.SPONSORED_ACADEMIES);
game.defer(DrawCards.keepAll(player, 3));
const otherPlayers = game.getPlayers().filter((p) => p.id !== player.id);
>>>>>>>
public play(player: Player) {
player.game.defer(new DiscardCards(player), Priority.SPONSORED_ACADEMIES);
player.game.defer(DrawCards.keepAll(player, 3));
const otherPlayers = player.game.getPlayers().filter((p) => p.id !== player.id); |
<<<<<<<
import { ICard } from "../ICard";
=======
import { PartyHooks } from "../../turmoil/parties/PartyHooks";
import { PartyName } from "../../turmoil/parties/PartyName";
import { REDS_RULING_POLICY_COST } from "../../constants";
>>>>>>>
import { ICard } from "../ICard";
import { PartyHooks } from "../../turmoil/parties/PartyHooks";
import { PartyName } from "../../turmoil/parties/PartyName";
import { REDS_RULING_POLICY_COST } from "../../constants";
<<<<<<<
availableOptions.options.push(
new SelectOption("Turn this card face down and gain 3 TR", () => {
this.isDisabled = true;
player.increaseTerraformRatingSteps(3, game);
game.log(
LogMessageType.DEFAULT,
"${0} turned ${1} face down to gain 3 TR",
new LogMessageData(LogMessageDataType.PLAYER, player.id),
new LogMessageData(LogMessageDataType.CARD, this.name)
);
return undefined;
})
);
=======
>>>>>>> |
<<<<<<<
public cb: (howToPay: HowToPay) => SelectSpace | undefined,
public amount: number = 0 ) {
=======
public amount: number,
public cb: (howToPay: HowToPay) => SelectSpace | undefined) {
>>>>>>>
public amount: number,
public cb: (howToPay: HowToPay) => SelectSpace | undefined,
) { |
<<<<<<<
card.play(player, game);
const input = game.deferredActions.peek()!.execute();
=======
card.play(player);
const input = game.deferredActions.next()!.execute();
>>>>>>>
card.play(player);
const input = game.deferredActions.peek()!.execute(); |
<<<<<<<
import { AresHandler } from "./ares/AresHandler";
=======
import { RandomMAOptionType } from "./RandomMAOptionType";
>>>>>>>
import { RandomMAOptionType } from "./RandomMAOptionType";
import { AresHandler } from "./ares/AresHandler"; |
<<<<<<<
public tile(selector: string): Builder {
this._addTile(selector);
return this;
}
=======
/**
* add non breakable space or simply empty space between items
*/
public get nbsp(): Builder {
this._checkExistingItem();
this._addSymbol(CardRenderSymbol.nbsp());
return this;
}
>>>>>>>
public tile(selector: string): Builder {
this._addTile(selector);
return this;
}
/**
* add non breakable space or simply empty space between items
*/
public get nbsp(): Builder {
this._checkExistingItem();
this._addSymbol(CardRenderSymbol.nbsp());
return this;
} |
<<<<<<<
const bonusText = bonuses.entries().map((elem) => `${elem[1]} ${bonusAsString(elem[0])}`).join(', ');
const tileText = tileTypeAsString(adjacentSpace.tile?.tileType);
player.game.log('${0} gains ${1} for placing next to ${2}', (b) => b.player(player).string(bonusText).string(tileText));
=======
const bonusText = bonuses.entries().map((elem) => `${elem[1]} ${SpaceBonus.toString(elem[0])}`).join(', ');
const tileText = adjacentSpace.tile !== undefined ? TileType.toString(adjacentSpace.tile?.tileType) : 'no tile';
game.log('${0} gains ${1} for placing next to ${2}', (b) => b.player(player).string(bonusText).string(tileText));
>>>>>>>
const bonusText = bonuses.entries().map((elem) => `${elem[1]} ${SpaceBonus.toString(elem[0])}`).join(', ');
const tileText = adjacentSpace.tile !== undefined ? TileType.toString(adjacentSpace.tile?.tileType) : 'no tile';
player.game.log('${0} gains ${1} for placing next to ${2}', (b) => b.player(player).string(bonusText).string(tileText));
<<<<<<<
player.increaseTerraformRatingSteps(steps, player.game);
player.game.log('${0}\'s TR increases ${1} step(s) for removing ${2}', (b) => b.player(player).number(steps).string(tileTypeAsString(initialTileType)));
=======
player.increaseTerraformRatingSteps(steps, game);
game.log('${0}\'s TR increases ${1} step(s) for removing ${2}', (b) => b.player(player).number(steps).string(TileType.toString(initialTileType)));
>>>>>>>
player.increaseTerraformRatingSteps(steps, player.game);
player.game.log('${0}\'s TR increases ${1} step(s) for removing ${2}', (b) => b.player(player).number(steps).string(TileType.toString(initialTileType))); |
<<<<<<<
import {TurmoilHandler} from './turmoil/TurmoilHandler';
import {TurmoilPolicy} from './turmoil/TurmoilPolicy';
import {StandardProjectCard} from './cards/standardProjects/StandardProjectCard';
=======
>>>>>>>
import {TurmoilHandler} from './turmoil/TurmoilHandler';
import {TurmoilPolicy} from './turmoil/TurmoilPolicy'; |
<<<<<<<
// {cardName: CardName.REVOLTING_COLONISTS, Factory: RevoltingColonists},
// {cardName: CardName.COSMIC_RADIATION, Factory: CosmicRadiation},
{cardName: CardName.OFF_WORLD_CITY_LIVING, Factory: OffWorldCityLiving},
=======
{cardName: CardName.REVOLTING_COLONISTS, Factory: RevoltingColonists},
{cardName: CardName.COSMIC_RADIATION, Factory: CosmicRadiation},
// {cardName: CardName.OFF_WORLD_CITY_LIVING, Factory: OffWorldCityLiving},
>>>>>>>
{cardName: CardName.REVOLTING_COLONISTS, Factory: RevoltingColonists},
{cardName: CardName.COSMIC_RADIATION, Factory: CosmicRadiation},
{cardName: CardName.OFF_WORLD_CITY_LIVING, Factory: OffWorldCityLiving}, |
<<<<<<<
{cardName: CardName.HE3_PRODUCTION_QUOTAS, Factory: HE3ProductionQuotas, compatibility: GameModule.Turmoil},
// {cardName: CardName.LUNA_CONFERENCE, Factory: LunaConference, compatibility: GameModule.Turmoil},
=======
// {cardName: CardName.HE3_PRODUCTION_QUOTAS, Factory: HE3ProductionQuotas, compatibility: GameModule.Turmoil},
{cardName: CardName.LUNA_CONFERENCE, Factory: LunaConference, compatibility: GameModule.Turmoil},
>>>>>>>
{cardName: CardName.HE3_PRODUCTION_QUOTAS, Factory: HE3ProductionQuotas, compatibility: GameModule.Turmoil},
{cardName: CardName.LUNA_CONFERENCE, Factory: LunaConference, compatibility: GameModule.Turmoil}, |
<<<<<<<
maxPay += this.spendableMegacredits();
return maxPay >= this.getCardCost(card) &&
(card.canPlay === undefined || card.canPlay(this));
=======
return canAfford && (card.canPlay === undefined || card.canPlay(this, this.game));
>>>>>>>
return canAfford && (card.canPlay === undefined || card.canPlay(this)); |
<<<<<<<
status.add(`Processing ${file.host}::${file.file_name}`);
let { name, description } = await loadYamlFile<{ name: string, description: string }>(path.resolve('samples', file.path));
status.complete(`Processing ${file.host}::${file.file_name}`);
=======
status.add(`Processing ${file.host}::${file.name}`);
let { name, description, id } = await loadYamlFile<{ name: string, description: string, id: string }>(path.resolve('samples', file.path));
// if (id == null || id.trim() === '') {
// throw new Error('Snippet ID cannot be empty');
// }
status.complete(`Processing ${file.host}::${file.name}`);
>>>>>>>
status.add(`Processing ${file.host}::${file.file_name}`);
let { name, description, id } = await loadYamlFile<{ name: string, description: string, id: string }>(path.resolve('samples', file.path));
// if (id == null || id.trim() === '') {
// throw new Error('Snippet ID cannot be empty');
// }
status.complete(`Processing ${file.host}::${file.file_name}`);
<<<<<<<
host: file.host,
gist: `https://raw.githubusercontent.com/${GH_ACCOUNT}/${GH_REPO}/deployment/samples/${file.host.toLowerCase()}/${file.group}/${file.file_name}`,
=======
...file,
gist: `https://raw.githubusercontent.com/${GH_ACCOUNT}/${GH_REPO}/${GH_BRANCH}/samples/${file.host}/${file.group}/${file.name}`,
>>>>>>>
host: file.host,
gist: `https://raw.githubusercontent.com/${GH_ACCOUNT}/${GH_REPO}/${GH_BRANCH}/samples/${file.host}/${file.group}/${file.file_name}`,
<<<<<<<
const groups = groupBy(files, 'host');
let promises = map(groups, async (items, host) => {
=======
const groups = groupBy(files.values(), 'host');
let promises = map(groups, async (items, group) => {
>>>>>>>
const groups = groupBy(files.values(), 'host');
let promises = map(groups, async (items, host) => { |
<<<<<<<
export class Windmills implements IProjectCard {
public cost = 6;
public tags = [Tags.ENERGY, Tags.BUILDING];
public name = CardName.WINDMILLS;
public cardType = CardType.AUTOMATED;
public canPlay(player: Player, game: Game): boolean {
return game.checkMinRequirements(player, GlobalParameter.OXYGEN, 7);
}
public play(player: Player): PlayerInput | undefined {
player.addProduction(Resources.ENERGY);
return undefined;
}
public getVictoryPoints() {
return 1;
}
public metadata: CardMetadata = {
cardNumber: '168',
requirements: CardRequirements.builder((b) => b.oxygen(7)),
renderData: CardRenderer.builder((b) => {
b.production((pb) => pb.energy(1));
}),
description: 'Requires 7% oxygen. Increase your Energy production 1 step.',
victoryPoints: 1,
}
=======
export class Windmills extends Card implements IProjectCard {
constructor() {
super({
cardType: CardType.AUTOMATED,
name: CardName.WINDMILLS,
tags: [Tags.ENERGY, Tags.BUILDING],
cost: 6,
metadata: {
cardNumber: '168',
requirements: CardRequirements.builder((b) => b.oxygen(7)),
renderData: CardRenderer.builder((b) => {
b.productionBox((pb) => pb.energy(1));
}),
description: 'Requires 7% oxygen. Increase your Energy production 1 step.',
victoryPoints: 1,
},
});
}
public canPlay(player: Player, game: Game): boolean {
return game.checkMinRequirements(player, GlobalParameter.OXYGEN, 7);
}
public play(player: Player): PlayerInput | undefined {
player.addProduction(Resources.ENERGY);
return undefined;
}
public getVictoryPoints() {
return 1;
}
>>>>>>>
export class Windmills extends Card implements IProjectCard {
constructor() {
super({
cardType: CardType.AUTOMATED,
name: CardName.WINDMILLS,
tags: [Tags.ENERGY, Tags.BUILDING],
cost: 6,
metadata: {
cardNumber: '168',
requirements: CardRequirements.builder((b) => b.oxygen(7)),
renderData: CardRenderer.builder((b) => {
b.production((pb) => pb.energy(1));
}),
description: 'Requires 7% oxygen. Increase your Energy production 1 step.',
victoryPoints: 1,
},
});
}
public canPlay(player: Player, game: Game): boolean {
return game.checkMinRequirements(player, GlobalParameter.OXYGEN, 7);
}
public play(player: Player): PlayerInput | undefined {
player.addProduction(Resources.ENERGY);
return undefined;
}
public getVictoryPoints() {
return 1;
} |
<<<<<<<
public addPlayCardDeferredAction(player: Player, game: Game) {
const playableCards = player.cardsInHand.filter((card) => card.resourceType === ResourceType.FLOATER && card.tags.indexOf(Tags.VENUS) !== -1);
=======
public addPlayCardInterrupt(player: Player, game: Game) {
const playableCards = player.getPlayableCards(game).filter((card) => card.resourceType === ResourceType.FLOATER && card.tags.indexOf(Tags.VENUS) !== -1);
>>>>>>>
public addPlayCardDeferredAction(player: Player, game: Game) {
const playableCards = player.getPlayableCards(game).filter((card) => card.resourceType === ResourceType.FLOATER && card.tags.indexOf(Tags.VENUS) !== -1); |
<<<<<<<
type LoadCallback = (game: Game | undefined) => void;
=======
enum State { WAITING, LOADING, READY }
>>>>>>>
type LoadCallback = (game: Game | undefined) => void;
enum State { WAITING, LOADING, READY }
<<<<<<<
public getGameByGameId(gameId: string, cb: LoadCallback): void {
if (this.loadedGames === true || this.games.has(gameId)) {
=======
public getGameByGameId(gameId: string, cb: (game: Game | undefined) => void): void {
if (this.state === State.READY || this.games.has(gameId)) {
>>>>>>>
public getGameByGameId(gameId: string, cb: LoadCallback): void {
if (this.state === State.READY || this.games.has(gameId)) {
<<<<<<<
public getGameByPlayerId(playerId: string, cb: LoadCallback): void {
if (this.loadedGames === true || this.playerToGame.has(playerId)) {
=======
public getGameByPlayerId(playerId: string, cb: (game: Game | undefined) => void): void {
if (this.state === State.READY || this.playerToGame.has(playerId)) {
>>>>>>>
public getGameByPlayerId(playerId: string, cb: LoadCallback): void {
if (this.state === State.READY || this.playerToGame.has(playerId)) { |
<<<<<<<
game = new Game('foobar', [player, redPlayer], player, gameOptions);
});
it('Should play: reds', function() {
game.turmoil!.rulingParty = game.turmoil!.getPartyByName(PartyName.REDS)!;
PoliticalAgendas.setNextAgenda(game.turmoil!, game);
expect(card.canPlay(player, game)).is.not.true;
});
=======
const game = Game.newInstance('foobar', [player, redPlayer], player, gameOptions);
>>>>>>>
game = Game.newInstance('foobar', [player, redPlayer], player, gameOptions);
});
it('Should play: reds', function() {
game.turmoil!.rulingParty = game.turmoil!.getPartyByName(PartyName.REDS)!;
PoliticalAgendas.setNextAgenda(game.turmoil!, game);
expect(card.canPlay(player, game)).is.not.true;
}); |
<<<<<<<
import {TheArchaicFoundationInstitute} from './TheArchaicFoundationInstitute';
=======
import {TempestConsultancy} from './TempestConsultancy';
// import {TheArchaicFoundationInstitute} from './TheArchaicFoundationInstitute';
>>>>>>>
import {TempestConsultancy} from './TempestConsultancy';
import {TheArchaicFoundationInstitute} from './TheArchaicFoundationInstitute'; |
<<<<<<<
public turmoil: Turmoil | undefined;
=======
private promoCardsOption: boolean;
private startingCorporations: number;
>>>>>>>
public turmoil: Turmoil | undefined;
private promoCardsOption: boolean;
private startingCorporations: number;
<<<<<<<
this.turmoilExtension = gameOptions.turmoilExtension;
this.dealer = new Dealer(this.preludeExtension, this.venusNextExtension, this.coloniesExtension, this.turmoilExtension, Math.random());
=======
this.promoCardsOption = gameOptions.promoCardsOption;
this.startingCorporations = gameOptions.startingCorporations;
this.dealer = new Dealer(this.preludeExtension, this.venusNextExtension, this.coloniesExtension, this.promoCardsOption, Math.random());
>>>>>>>
this.turmoilExtension = gameOptions.turmoilExtension;
this.promoCardsOption = gameOptions.promoCardsOption;
this.startingCorporations = gameOptions.startingCorporations;
this.dealer = new Dealer(this.preludeExtension, this.venusNextExtension, this.coloniesExtension, this.promoCardsOption, this.turmoilExtension, Math.random());
<<<<<<<
=======
// Rebuild dealer object to be sure that we will have cards in the same order
let dealer = new Dealer(this.preludeExtension, this.venusNextExtension, this.coloniesExtension, this.promoCardsOption);
this.dealer = dealer.loadFromJSON(d.dealer);
>>>>>>> |
<<<<<<<
WINDMILLS = "Windmills",
AERIAL_MAPPERS = "Aerial Mappers",
AEROSPORT_TOURNAMENT = "Aerosport Tournament",
AIR_SCRAPPING_EXPEDITION = "Air-Scrapping Expedition",
APHRODITE = "Aphrodite",
ATALANTA_PLANITIA_LAB = "Atalanta Planitia Lab",
ATMOSCOOP = "Atmoscoop",
CELESTIC = "Celestic",
COMET_FOR_VENUS = "Comet for Venus",
CORRODER_SUITS = "Corroder Suits",
DAWN_CITY = "Dawn City",
DEUTERIUM_EXPORT = "Deuterium Export",
EXTRACTOR_BALLOONS = "Extractor Balloons",
EXTREMOPHILES = "Extremophiles",
FLOATING_HABS = "Floating Habs",
FORCED_PRECIPITATION = "Forced Precipitation",
FREYJA_BIODOMES = "Freyja Biodomes",
GHG_IMPORT_FROM_VENUS = "GHG Import From Venus",
GIANT_SOLAR_SHADE = "Giant Solar Shade",
HYDROGEN_TO_VENUS = "Hydrogen to Venus",
IO_SULPHUR_RESEARCH = "Io Sulphur Research",
ISHTAR_MINING = "Ishtar Mining",
JET_STREAM_MICROSCRAPPERS = "Jet Stream Microscrappers",
LOCAL_SHADING = "Local Shading",
LUNA_METROPOLIS = "Luna Metropolis",
LUXURY_FOODS = "Luxury Foods",
MAXWELL_BASE = "MAxwell Base",
MORNING_STAR_INC = "Morning Star Inc.",
NEUTRALIZER_FACTORY = "Neutralizer Factory",
ORBITAL_REFLECTORS = "Orbital Reflectors",
ROTATOR_IMPACTS = "Rotator Impacts",
SPIN_INDUCING_ASTEROID = "Spin-Inducing Asteroid",
SPONSORED_ACADEMIES = "Sponsored Academies",
STRATOPOLIS = "Stratopolis",
STRATOSPHERIC_BIRDS = "Stratospheric Birds",
SULPHUR_EATING_BACTERIA = "Sulphur-Eating Bacteria",
SULPHUR_EXPORTS = "Sulphur Exports",
TERRAFORMING_CONTRACT = "Terraforming Contract",
THERMOPHILES = "Thermophiles",
VENUS_GOVERNOR = "Venus Governor",
VENUSIAN_ANIMALS = "Venusian Animals",
VENUSIAN_INSECTS = "Venusian Insects",
VENUSIAN_PLANTS = "Venusian Plants",
VENUS_MAGNETIZER = "Venus Magnetizer",
VENUS_SOILS = "Venus Soils",
VENUS_WAYSTATION = "Venus Waystation",
VIRON = "Viron",
WATER_TO_VENUS = "Water to Venus"
=======
WATER_SPLITTING_PLANT = "Water Splitting Plant",
WAVE_POWER = "Wave Power",
WINDMILLS = "Windmills",
WORMS = "Worms",
ZEPPELINS = "Zeppelins",
BEGINNER_CORPORATION = "Beginner Corporation",
CREDICOR = "CrediCor",
ECOLINE = "EcoLine",
HELION = "Helion",
INTERPLANETARY_CINEMATICS = "Interplanetary Cinematics",
INVENTRIX = "Inventrix",
MINING_GUILD = "Mining Guild",
PHOBOLOG = "PhoboLog",
SATURN_SYSTEMS = "Saturn Systems",
TERACTOR = "Teractor",
THARSIS_REPUBLIC = "Tharsis Republic",
THORGATE = "Thorgate",
UNITED_NATIONS_MARS_INITIATIVE = "United Nations Mars Initiative",
ACQUIRED_SPACE_AGENCY = "Acquired Space Agency",
ALLIED_BANKS = "Allied Banks",
BIOFUELS = "Biofuels",
BIOLAB = "Biolab",
BIOSPHERE_SUPPORT = "Biosphere Support",
BUSINESS_EMPIRE = "Business Empire",
CHEUNG_SHING_MARS = "Cheung Shing MARS",
DONATION = "Donation",
EXPERIMENTAL_FOREST = "Experimental Forest",
GALILEAN_MINING = "Galilean Mining",
HUGE_ASTEROID = "Huge Asteroid",
IO_RESEARCH_OUTPOST = "Io Research Outpost",
LOAN = "Loan",
MARTIAN_SURVEY = "Martian Survey",
METAL_RICH_ASTEROID = "Metal-Rich Asteroid"
>>>>>>>
AERIAL_MAPPERS = "Aerial Mappers",
AEROSPORT_TOURNAMENT = "Aerosport Tournament",
AIR_SCRAPPING_EXPEDITION = "Air-Scrapping Expedition",
APHRODITE = "Aphrodite",
ATALANTA_PLANITIA_LAB = "Atalanta Planitia Lab",
ATMOSCOOP = "Atmoscoop",
CELESTIC = "Celestic",
COMET_FOR_VENUS = "Comet for Venus",
CORRODER_SUITS = "Corroder Suits",
DAWN_CITY = "Dawn City",
DEUTERIUM_EXPORT = "Deuterium Export",
EXTRACTOR_BALLOONS = "Extractor Balloons",
EXTREMOPHILES = "Extremophiles",
FLOATING_HABS = "Floating Habs",
FORCED_PRECIPITATION = "Forced Precipitation",
FREYJA_BIODOMES = "Freyja Biodomes",
GHG_IMPORT_FROM_VENUS = "GHG Import From Venus",
GIANT_SOLAR_SHADE = "Giant Solar Shade",
HYDROGEN_TO_VENUS = "Hydrogen to Venus",
IO_SULPHUR_RESEARCH = "Io Sulphur Research",
ISHTAR_MINING = "Ishtar Mining",
JET_STREAM_MICROSCRAPPERS = "Jet Stream Microscrappers",
LOCAL_SHADING = "Local Shading",
LUNA_METROPOLIS = "Luna Metropolis",
LUXURY_FOODS = "Luxury Foods",
MAXWELL_BASE = "MAxwell Base",
MORNING_STAR_INC = "Morning Star Inc.",
NEUTRALIZER_FACTORY = "Neutralizer Factory",
ORBITAL_REFLECTORS = "Orbital Reflectors",
ROTATOR_IMPACTS = "Rotator Impacts",
SPIN_INDUCING_ASTEROID = "Spin-Inducing Asteroid",
SPONSORED_ACADEMIES = "Sponsored Academies",
STRATOPOLIS = "Stratopolis",
STRATOSPHERIC_BIRDS = "Stratospheric Birds",
SULPHUR_EATING_BACTERIA = "Sulphur-Eating Bacteria",
SULPHUR_EXPORTS = "Sulphur Exports",
TERRAFORMING_CONTRACT = "Terraforming Contract",
THERMOPHILES = "Thermophiles",
VENUS_GOVERNOR = "Venus Governor",
VENUSIAN_ANIMALS = "Venusian Animals",
VENUSIAN_INSECTS = "Venusian Insects",
VENUSIAN_PLANTS = "Venusian Plants",
VENUS_MAGNETIZER = "Venus Magnetizer",
VENUS_SOILS = "Venus Soils",
VENUS_WAYSTATION = "Venus Waystation",
VIRON = "Viron",
WATER_TO_VENUS = "Water to Venus",
WATER_SPLITTING_PLANT = "Water Splitting Plant",
WAVE_POWER = "Wave Power",
WINDMILLS = "Windmills",
WORMS = "Worms",
ZEPPELINS = "Zeppelins",
BEGINNER_CORPORATION = "Beginner Corporation",
CREDICOR = "CrediCor",
ECOLINE = "EcoLine",
HELION = "Helion",
INTERPLANETARY_CINEMATICS = "Interplanetary Cinematics",
INVENTRIX = "Inventrix",
MINING_GUILD = "Mining Guild",
PHOBOLOG = "PhoboLog",
SATURN_SYSTEMS = "Saturn Systems",
TERACTOR = "Teractor",
THARSIS_REPUBLIC = "Tharsis Republic",
THORGATE = "Thorgate",
UNITED_NATIONS_MARS_INITIATIVE = "United Nations Mars Initiative",
ACQUIRED_SPACE_AGENCY = "Acquired Space Agency",
ALLIED_BANKS = "Allied Banks",
BIOFUELS = "Biofuels",
BIOLAB = "Biolab",
BIOSPHERE_SUPPORT = "Biosphere Support",
BUSINESS_EMPIRE = "Business Empire",
CHEUNG_SHING_MARS = "Cheung Shing MARS",
DONATION = "Donation",
EXPERIMENTAL_FOREST = "Experimental Forest",
GALILEAN_MINING = "Galilean Mining",
HUGE_ASTEROID = "Huge Asteroid",
IO_RESEARCH_OUTPOST = "Io Research Outpost",
LOAN = "Loan",
MARTIAN_SURVEY = "Martian Survey",
METAL_RICH_ASTEROID = "Metal-Rich Asteroid" |
<<<<<<<
=======
>>>>>>>
<<<<<<<
public getResourceCards(resource: ResourceType): Array<IProjectCard> {
const result: Array<IProjectCard> = [];
this.playedCards.forEach((card) => {
if (card.resourceType !== undefined && card.resourceType === resource) {
result.push(card);
}
});
return result;
}
=======
public getResourceCards(resource: ResourceType): Array<IProjectCard> {
const result: Array<IProjectCard> = [];
this.playedCards.forEach((card) => {
if (card.resourceType !== undefined && card.resourceType === resource) {
result.push(card);
}
});
if (this.corporationCard !== undefined && this.corporationCard.name === new Celestic().name && resource === ResourceType.FLOATER) {
result.push(new Celestic());
}
return result;
}
public getResourceCount(resource: ResourceType): number {
let count: number = 0;
this.playedCards.forEach((card) => {
if (card.resourceType === resource) {
count += this.getResourcesOnCard(card);
}
});
if (this.corporationCard !== undefined && this.corporationCard.name === new Celestic().name && resource === ResourceType.FLOATER) {
count += this.getResourcesOnCard(new Celestic());
}
return count;
}
>>>>>>>
public getResourceCards(resource: ResourceType): Array<IProjectCard> {
const result: Array<IProjectCard> = [];
this.playedCards.forEach((card) => {
if (card.resourceType !== undefined && card.resourceType === resource) {
result.push(card);
}
});
if (this.corporationCard !== undefined && this.corporationCard.name === new Celestic().name && resource === ResourceType.FLOATER) {
result.push(new Celestic());
}
return result;
}
public getResourceCount(resource: ResourceType): number {
let count: number = 0;
this.playedCards.forEach((card) => {
if (card.resourceType === resource) {
count += this.getResourcesOnCard(card);
}
});
if (this.corporationCard !== undefined && this.corporationCard.name === new Celestic().name && resource === ResourceType.FLOATER) {
count += this.getResourcesOnCard(new Celestic());
}
return count;
} |
<<<<<<<
export class QuantumExtractor implements IProjectCard {
public cost = 13;
public tags = [Tags.SCIENCE, Tags.ENERGY];
public name = CardName.QUANTUM_EXTRACTOR;
public cardType = CardType.ACTIVE;
public canPlay(player: Player): boolean {
return player.getTagCount(Tags.SCIENCE) >= 4;
}
public getCardDiscount(_player: Player, _game: Game, card: IProjectCard) {
if (card.tags.indexOf(Tags.SPACE) !== -1) {
return 2;
}
return 0;
}
public play(player: Player) {
player.addProduction(Resources.ENERGY, 4);
return undefined;
}
public metadata: CardMetadata = {
cardNumber: '079',
requirements: CardRequirements.builder((b) => b.tag(Tags.SCIENCE, 4)),
renderData: CardRenderer.builder((b) => {
b.effect('When you play a Space card, you pay 2 MC less for it.', (eb) => {
eb.space().played.startEffect.megacredits(-2);
}).br;
b.productionBox((pb) => pb.energy(4).digit);
}),
description: 'Requires 4 science tags. Increase your energy production 4 steps.',
=======
export class QuantumExtractor extends Card implements IProjectCard {
constructor() {
super({
cardType: CardType.ACTIVE,
name: CardName.QUANTUM_EXTRACTOR,
tags: [Tags.SCIENCE, Tags.ENERGY],
cost: 13,
metadata: {
cardNumber: '079',
requirements: CardRequirements.builder((b) => b.tag(Tags.SCIENCE, 4)),
renderData: CardRenderer.builder((b) => {
b.effectBox((eb) => {
eb.space().played.startEffect.megacredits(-2);
eb.description('Effect: When you play a Space card, you pay 2 MC less for it.');
}).br;
b.productionBox((pb) => pb.energy(4).digit);
}),
description: 'Requires 4 science tags. Increase your energy production 4 steps.',
},
});
}
public canPlay(player: Player): boolean {
return player.getTagCount(Tags.SCIENCE) >= 4;
}
public getCardDiscount(_player: Player, _game: Game, card: IProjectCard) {
if (card.tags.indexOf(Tags.SPACE) !== -1) {
return 2;
>>>>>>>
export class QuantumExtractor extends Card implements IProjectCard {
constructor() {
super({
cardType: CardType.ACTIVE,
name: CardName.QUANTUM_EXTRACTOR,
tags: [Tags.SCIENCE, Tags.ENERGY],
cost: 13,
metadata: {
cardNumber: '079',
requirements: CardRequirements.builder((b) => b.tag(Tags.SCIENCE, 4)),
renderData: CardRenderer.builder((b) => {
b.effect('When you play a Space card, you pay 2 MC less for it.', (eb) => {
eb.space().played.startEffect.megacredits(-2);
}).br;
b.productionBox((pb) => pb.energy(4).digit);
}),
description: 'Requires 4 science tags. Increase your energy production 4 steps.',
},
});
}
public canPlay(player: Player): boolean {
return player.getTagCount(Tags.SCIENCE) >= 4;
}
public getCardDiscount(_player: Player, _game: Game, card: IProjectCard) {
if (card.tags.indexOf(Tags.SPACE) !== -1) {
return 2; |
<<<<<<<
game.runNextInterrupt(() => {});
expect(player.megaCredits).to.eq(9);
expect(player.cardsInHand.length).to.eq(1);
=======
expect(player.megaCredits).to.eq(11);
expect(player.cardsInHand.length).to.eq(3);
>>>>>>>
game.runNextInterrupt(() => {});
expect(player.megaCredits).to.eq(11);
expect(player.cardsInHand.length).to.eq(3); |
<<<<<<<
import { ProjectInspection } from "./cards/promo/ProjectInspection";
=======
import { OrbitalCleanup } from "./cards/promo/OrbitalCleanup";
>>>>>>>
import { OrbitalCleanup } from "./cards/promo/OrbitalCleanup";
import { ProjectInspection } from "./cards/promo/ProjectInspection";
<<<<<<<
{ cardName: CardName.INTERPLANETARY_TRADE, factory: InterplanetaryTrade },
{ cardName: CardName.PROJECT_INSPECTION, factory: ProjectInspection }
=======
{ cardName: CardName.INTERPLANETARY_TRADE, factory: InterplanetaryTrade },
{ cardName: CardName.ORBITAL_CLEANUP, factory: OrbitalCleanup }
>>>>>>>
{ cardName: CardName.INTERPLANETARY_TRADE, factory: InterplanetaryTrade },
{ cardName: CardName.ORBITAL_CLEANUP, factory: OrbitalCleanup },
{ cardName: CardName.PROJECT_INSPECTION, factory: ProjectInspection } |
<<<<<<<
requirements: CardRequirements.builder((b) => b.party(PartyName.KELVINISTS).miningTiles(1)),
=======
requirements: CardRequirements.builder((b) => b.party(PartyName.KELVINISTS).miningTiles(1).any()),
>>>>>>>
requirements: CardRequirements.builder((b) => b.party(PartyName.KELVINISTS).miningTiles(1).any()),
<<<<<<<
description: 'Requires that Kelvinists are ruling or that you have 2 delegates there and 1 mine tile on the Moon. ' +
'Pay 1 steel per mine tile on the Moon to gain 4 heat per mine tile on the Moon. Raise the Mining Rate 1 step.',
=======
description: 'Requires that Kelvinists are ruling or that you have 2 delegates there, and 1 mine tile on the Moon. ' +
'Pay 1 steel per mine tile on the Moon to gain 4 heat per mine tile on the Moon. Raise Mining Rate 1 step.',
>>>>>>>
description: 'Requires that Kelvinists are ruling or that you have 2 delegates there, and 1 mine tile on the Moon. ' +
'Pay 1 steel per mine tile on the Moon to gain 4 heat per mine tile on the Moon. Raise the Mining Rate 1 step.',
<<<<<<<
b.minus().steel(1).slash().tile(TileType.MOON_MINE, false).asterix().arrow().text('4').heat(1).br;
b.moonMiningRate();
=======
b.minus().steel(1).slash().tile(TileType.MOON_MINE, false).asterix().br;
b.text('=>').heat(4).br;
b.moonMine();
>>>>>>>
b.minus().steel(1).slash().tile(TileType.MOON_MINE, false).asterix().arrow().text('4').heat(1).br;
b.moonMiningRate(); |
<<<<<<<
export class VenusianAnimals implements IProjectCard, IResourceCard {
public cost = 15;
public tags = [Tags.VENUS, Tags.ANIMAL, Tags.SCIENCE];
public name = CardName.VENUSIAN_ANIMALS;
public cardType = CardType.ACTIVE;
public resourceType = ResourceType.ANIMAL;
public resourceCount: number = 0;
public canPlay(player: Player): boolean {
return player.game.checkMinRequirements(player, GlobalParameter.VENUS, 18);
}
public play() {
return undefined;
}
public onCardPlayed(player: Player, card: IProjectCard): void {
player.addResourceTo(this, card.tags.filter((tag) => tag === Tags.SCIENCE).length);
}
public getVictoryPoints(): number {
return this.resourceCount;
}
public metadata: CardMetadata = {
cardNumber: '259',
requirements: CardRequirements.builder((b) => b.venus(18)),
renderData: CardRenderer.builder((b) => {
b.effect('When you play a Science tag, including this, add 1 Animal to this card.', (eb)=> {
eb.science().played.startEffect.animals(1);
}).br;
b.vpText('1 VP per Animal on this card.');
}),
description: 'Requires Venus 18%',
victoryPoints: CardRenderDynamicVictoryPoints.animals(1, 1),
}
=======
export class VenusianAnimals extends Card implements IResourceCard {
constructor() {
super({
name: CardName.VENUSIAN_ANIMALS,
cardType: CardType.ACTIVE,
tags: [Tags.VENUS, Tags.ANIMAL, Tags.SCIENCE],
cost: 15,
resourceType: ResourceType.ANIMAL,
metadata: {
cardNumber: '259',
requirements: CardRequirements.builder((b) => b.venus(18)),
renderData: CardRenderer.builder((b) => {
b.effect('When you play a Science tag, including this, add 1 Animal to this card.', (eb)=> {
eb.science().played.startEffect.animals(1);
}).br;
b.vpText('1 VP per Animal on this card.');
}),
description: 'Requires Venus 18%',
victoryPoints: CardRenderDynamicVictoryPoints.animals(1, 1),
},
});
};
public resourceCount: number = 0;
public canPlay(player: Player, game: Game): boolean {
return game.checkMinRequirements(player, GlobalParameter.VENUS, 18);
}
public play() {
return undefined;
}
public onCardPlayed(player: Player, card: IProjectCard): void {
player.addResourceTo(this, card.tags.filter((tag) => tag === Tags.SCIENCE).length);
}
public getVictoryPoints(): number {
return this.resourceCount;
}
>>>>>>>
export class VenusianAnimals extends Card implements IResourceCard {
constructor() {
super({
name: CardName.VENUSIAN_ANIMALS,
cardType: CardType.ACTIVE,
tags: [Tags.VENUS, Tags.ANIMAL, Tags.SCIENCE],
cost: 15,
resourceType: ResourceType.ANIMAL,
metadata: {
cardNumber: '259',
requirements: CardRequirements.builder((b) => b.venus(18)),
renderData: CardRenderer.builder((b) => {
b.effect('When you play a Science tag, including this, add 1 Animal to this card.', (eb)=> {
eb.science().played.startEffect.animals(1);
}).br;
b.vpText('1 VP per Animal on this card.');
}),
description: 'Requires Venus 18%',
victoryPoints: CardRenderDynamicVictoryPoints.animals(1, 1),
},
});
};
public resourceCount: number = 0;
public canPlay(player: Player): boolean {
return player.game.checkMinRequirements(player, GlobalParameter.VENUS, 18);
}
public play() {
return undefined;
}
public onCardPlayed(player: Player, card: IProjectCard): void {
player.addResourceTo(this, card.tags.filter((tag) => tag === Tags.SCIENCE).length);
}
public getVictoryPoints(): number {
return this.resourceCount;
} |
<<<<<<<
public onStandardProject(projectType: StandardProjectCard): void {
if (this.corporationCard !== undefined && this.corporationCard.onStandardProject!== undefined) {
this.corporationCard.onStandardProject(this, projectType);
}
for (const playedCard of this.playedCards) {
if (playedCard.onStandardProject !== undefined) {
playedCard.onStandardProject(this, projectType);
}
}
}
public get availableHeat(): number {
return this.heat + (this.isCorporation(CardName.STORMCRAFT_INCORPORATED) ? this.getResourcesOnCorporation() * 2 : 0);
}
public spendHeat(amount: number, cb: () => (undefined | PlayerInput) = () => undefined) : PlayerInput | undefined {
if (this.isCorporation(CardName.STORMCRAFT_INCORPORATED) && this.getResourcesOnCorporation() > 0 ) {
return (<StormCraftIncorporated> this.corporationCard).spendHeat(this, amount, cb);
}
this.heat -= amount;
return cb();
}
=======
>>>>>>>
public get availableHeat(): number {
return this.heat + (this.isCorporation(CardName.STORMCRAFT_INCORPORATED) ? this.getResourcesOnCorporation() * 2 : 0);
}
public spendHeat(amount: number, cb: () => (undefined | PlayerInput) = () => undefined) : PlayerInput | undefined {
if (this.isCorporation(CardName.STORMCRAFT_INCORPORATED) && this.getResourcesOnCorporation() > 0 ) {
return (<StormCraftIncorporated> this.corporationCard).spendHeat(this, amount, cb);
}
this.heat -= amount;
return cb();
} |
<<<<<<<
if (this.chairman !== 'NEUTRAL') {
const player = game.getPlayerById(this.chairman);
player.increaseTerraformRating();
game.log('${0} is the new chairman and got 1 TR increase', (b) => b.player(player));
} else {
game.log('A neutral delegate is the new chairman.');
}
=======
>>>>>>> |
<<<<<<<
=======
import {GlobalParameter} from '../../GlobalParameter';
import {Units} from '../../Units';
>>>>>>>
import {Units} from '../../Units'; |
<<<<<<<
{cardName: CardName.LUNAR_STEEL, Factory: LunarSteel},
// {cardName: CardName.RUST_EATING_BACTERIA, Factory: RustEatingBacteria},
=======
// {cardName: CardName.LUNAR_STEEL, Factory: LunarSteel},
{cardName: CardName.RUST_EATING_BACTERIA, Factory: RustEatingBacteria},
>>>>>>>
{cardName: CardName.LUNAR_STEEL, Factory: LunarSteel},
{cardName: CardName.RUST_EATING_BACTERIA, Factory: RustEatingBacteria}, |
<<<<<<<
card.action(player);
expect(player.game.deferredActions).has.lengthOf(1);
const selectHowToPay = player.game.deferredActions.next()!.execute() as SelectHowToPay;
=======
card.action(player, game);
expect(game.deferredActions).has.lengthOf(1);
const selectHowToPay = game.deferredActions.peek()!.execute() as SelectHowToPay;
>>>>>>>
card.action(player);
expect(game.deferredActions).has.lengthOf(1);
const selectHowToPay = game.deferredActions.peek()!.execute() as SelectHowToPay;
<<<<<<<
expect(player.game.deferredActions).has.lengthOf(1);
const selectHowToPay = player.game.deferredActions.next()!.execute() as SelectHowToPay;
=======
expect(game.deferredActions).has.lengthOf(1);
const selectHowToPay = game.deferredActions.peek()!.execute() as SelectHowToPay;
>>>>>>>
expect(game.deferredActions).has.lengthOf(1);
const selectHowToPay = game.deferredActions.peek()!.execute() as SelectHowToPay; |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.