Skip to content

Commit 5d4e4ae

Browse files
committed
Removed redundant number type when assigning a value.
1 parent 60fa8f7 commit 5d4e4ae

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

starter_kits/TypeScript/hlt/Game.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import { Dropoff } from "./Dropoff";
88
import { ServerCommunication } from "./ServerCommunicaion";
99

1010
export class Game {
11-
turnNumber: number = 0;
11+
turnNumber = 0;
1212
server: ServerCommunication = new ServerCommunication();
1313

14-
public myId: number = 0;
14+
public myId = 0;
1515
public players = new Map<number, Player>();
1616
public me?: Player;
1717
public gameMap?: GameMap;

starter_kits/TypeScript/hlt/Random.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
export class Random {
44
private _seed: number;
5-
6-
constructor(public seed: number = Math.random() * 32423534) {
5+
6+
constructor(public seed = Math.random() * 32423534) {
77
this._seed = Math.floor(Math.abs(seed)) % 2147483647;
88
}
99

starter_kits/TypeScript/hlt/constants.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ export class Constants {
88
*/
99
static readonly MAX_BFS_STEPS = 1024; // search an entire 32x32 region
1010

11-
static SHIP_COST: number = 0;
12-
static DROPOFF_COST: number = 0;
13-
static MAX_ENERGY: number = 0;
14-
static MAX_TURNS: number = 0;
15-
static EXTRACT_RATIO: number = 0;
16-
static MOVE_COST_RATIO: number = 0;
17-
static INSPIRATION_ENABLED: number = 0;
18-
static INSPIRATION_RADIUS: number = 0;
19-
static INSPIRATION_SHIP_COUNT: number = 0;
20-
static INSPIRED_EXTRACT_RATIO: number = 0;
21-
static INSPIRED_BONUS_MULTIPLIER: number = 0;
22-
static INSPIRED_MOVE_COST_RATIO: number = 0;
11+
static SHIP_COST = 0;
12+
static DROPOFF_COST = 0;
13+
static MAX_ENERGY = 0;
14+
static MAX_TURNS = 0;
15+
static EXTRACT_RATIO = 0;
16+
static MOVE_COST_RATIO = 0;
17+
static INSPIRATION_ENABLED = 0;
18+
static INSPIRATION_RADIUS = 0;
19+
static INSPIRATION_SHIP_COUNT = 0;
20+
static INSPIRED_EXTRACT_RATIO = 0;
21+
static INSPIRED_BONUS_MULTIPLIER = 0;
22+
static INSPIRED_MOVE_COST_RATIO = 0;
2323

2424
/**
2525
* Load constants from JSON given by the game engine.

starter_kits/TypeScript/hlt/gameMap.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import { Entity } from "./Entity";
1313
*/
1414
export class GameMap {
1515
readonly cells: MapCell[][];
16-
public width: number = 0;
17-
public height: number = 0;
16+
public width = 0;
17+
public height = 0;
1818

1919
constructor(cells: number[][]) {
2020
this.width = cells[0].length;

0 commit comments

Comments
 (0)