mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-24 13:52:45 +00:00
Refactor GameImpl and GameView methods to remove unnecessary return statements
- Updated setOwnerID, setDefended, forEachTile, and setFallout methods in GameImpl and GameView to eliminate redundant return statements
This commit is contained in:
@@ -863,7 +863,7 @@ export class GameImpl implements Game {
|
||||
return this._map.hasOwner(ref);
|
||||
}
|
||||
setOwnerID(ref: TileRef, playerId: number): void {
|
||||
return this._map.setOwnerID(ref, playerId);
|
||||
this._map.setOwnerID(ref, playerId);
|
||||
}
|
||||
hasFallout(ref: TileRef): boolean {
|
||||
return this._map.hasFallout(ref);
|
||||
@@ -874,7 +874,7 @@ export class GameImpl implements Game {
|
||||
}
|
||||
|
||||
setDefended(ref: TileRef, value: boolean): void {
|
||||
return this._map.setDefended(ref, value);
|
||||
this._map.setDefended(ref, value);
|
||||
}
|
||||
isBorder(ref: TileRef): boolean {
|
||||
return this._map.isBorder(ref);
|
||||
@@ -898,7 +898,7 @@ export class GameImpl implements Game {
|
||||
return this._map.terrainType(ref);
|
||||
}
|
||||
forEachTile(fn: (tile: TileRef) => void): void {
|
||||
return this._map.forEachTile(fn);
|
||||
this._map.forEachTile(fn);
|
||||
}
|
||||
manhattanDist(c1: TileRef, c2: TileRef): number {
|
||||
return this._map.manhattanDist(c1, c2);
|
||||
|
||||
@@ -846,13 +846,13 @@ export class GameView implements GameMap {
|
||||
return this._map.hasOwner(ref);
|
||||
}
|
||||
setOwnerID(ref: TileRef, playerId: number): void {
|
||||
return this._map.setOwnerID(ref, playerId);
|
||||
this._map.setOwnerID(ref, playerId);
|
||||
}
|
||||
hasFallout(ref: TileRef): boolean {
|
||||
return this._map.hasFallout(ref);
|
||||
}
|
||||
setFallout(ref: TileRef, value: boolean): void {
|
||||
return this._map.setFallout(ref, value);
|
||||
this._map.setFallout(ref, value);
|
||||
}
|
||||
|
||||
isDefended(ref: TileRef): boolean {
|
||||
@@ -860,7 +860,7 @@ export class GameView implements GameMap {
|
||||
}
|
||||
|
||||
setDefended(ref: TileRef, value: boolean): void {
|
||||
return this._map.setDefended(ref, value);
|
||||
this._map.setDefended(ref, value);
|
||||
}
|
||||
isBorder(ref: TileRef): boolean {
|
||||
return this._map.isBorder(ref);
|
||||
@@ -884,7 +884,7 @@ export class GameView implements GameMap {
|
||||
return this._map.terrainType(ref);
|
||||
}
|
||||
forEachTile(fn: (tile: TileRef) => void): void {
|
||||
return this._map.forEachTile(fn);
|
||||
this._map.forEachTile(fn);
|
||||
}
|
||||
manhattanDist(c1: TileRef, c2: TileRef): number {
|
||||
return this._map.manhattanDist(c1, c2);
|
||||
|
||||
Reference in New Issue
Block a user