Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions src/games/crosscontrol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -656,16 +656,14 @@ export class CrossControlGame extends GameBase {
private influenceMarkers(): Map<playerid, {row: number, col: number}[]> {
const markers = new Map<playerid, {row: number, col: number}[]>([[1, []], [2, []]]);
for (const cell of this.listCells() as string[]) {
if (!this.board.has(cell)) {
const cellController = this.cellController(cell);
if (cellController === undefined) continue;
const [x, y] = this.getGraph().algebraic2coords(cell);
const cellCoords = {row: y, col: x};
if (cellController === 1) {
markers.get(1)!.push(cellCoords);
} else {
markers.get(2)!.push(cellCoords);
}
const cellController = this.cellController(cell);
if (cellController === undefined) continue;
const [x, y] = this.getGraph().algebraic2coords(cell);
const cellCoords = {row: y, col: x};
if (cellController === 1) {
markers.get(1)!.push(cellCoords);
} else {
markers.get(2)!.push(cellCoords);
}
}
return markers;
Expand Down
3 changes: 2 additions & 1 deletion src/games/intermedium.ts
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,8 @@ export class IntermediumGame extends GameBase {
style: "squares",
width: BOARD_COLS,
height: BOARD_ROWS,
markers
markers,
strokeOpacity: 0
},
legend: {
A: [{ name: "piece", colour: 1 }],
Expand Down
5 changes: 3 additions & 2 deletions src/games/y.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import i18next from "i18next";

* Add the new class graph to the imports (a class that implements IGraph)
* Append this new type to attribute `graph`
* Includes a condition to method `getGraph` returning an object of the new class
* Includes a condition to method `edges` defining the sets of cells for each edge
* Include a condition to method `getGraph` returning an object of the new class
* Include a condition to method `edges` defining the sets of cells for each edge
* Update the keys `options` and `board` of rep:APRenderRep in method `render`
* Add the new variant at `apgames.json`
*/
Expand Down Expand Up @@ -80,6 +80,7 @@ export class YGame extends GameBase {
{ uid: "progressive", group: "ruleset" }, // progressive variant with group restriction
{ uid: "#boardtype", }, // triangular board
{ uid: "bent", group: "boardtype"},
{ uid: "bent", group: "boardtype" },
],
categories: ["goal>connect", "mechanic>place", "board>shape>tri", "board>connect>hex", "components>simple>1per"],
flags: ["pie"],
Expand Down
Loading