File tree Expand file tree Collapse file tree 5 files changed +5
-5
lines changed
Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ export class GameRunner {
196196 playerID : PlayerID ,
197197 x ?: number ,
198198 y ?: number ,
199- units ?: PlayerBuildableUnitType [ ] | null ,
199+ units ?: readonly PlayerBuildableUnitType [ ] | null ,
200200 ) : PlayerActions {
201201 const player = this . game . player ( playerID ) ;
202202 const tile =
Original file line number Diff line number Diff line change @@ -656,7 +656,7 @@ export interface Player {
656656 unitsOwned ( type : UnitType ) : number ;
657657 buildableUnits (
658658 tile : TileRef | null ,
659- units ?: PlayerBuildableUnitType [ ] ,
659+ units ?: readonly PlayerBuildableUnitType [ ] ,
660660 ) : BuildableUnit [ ] ;
661661 canBuild ( type : UnitType , targetTile : TileRef ) : TileRef | false ;
662662 buildUnit < T extends UnitType > (
Original file line number Diff line number Diff line change @@ -406,7 +406,7 @@ export class PlayerView {
406406
407407 async actions (
408408 tile ?: TileRef ,
409- units ?: PlayerBuildableUnitType [ ] | null ,
409+ units ?: readonly PlayerBuildableUnitType [ ] | null ,
410410 ) : Promise < PlayerActions > {
411411 return this . game . worker . playerInteraction (
412412 this . id ( ) ,
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ export class WorkerClient {
165165 playerID : PlayerID ,
166166 x ?: number ,
167167 y ?: number ,
168- units ?: PlayerBuildableUnitType [ ] | null ,
168+ units ?: readonly PlayerBuildableUnitType [ ] | null ,
169169 ) : Promise < PlayerActions > {
170170 return new Promise ( ( resolve , reject ) => {
171171 if ( ! this . isInitialized ) {
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ export interface PlayerActionsMessage extends BaseWorkerMessage {
6363 playerID : PlayerID ;
6464 x ?: number ;
6565 y ?: number ;
66- units ?: PlayerBuildableUnitType [ ] | null ;
66+ units ?: readonly PlayerBuildableUnitType [ ] | null ;
6767}
6868
6969export interface PlayerActionsResultMessage extends BaseWorkerMessage {
You can’t perform that action at this time.
0 commit comments