Opened 3 years ago

Last modified 7 months ago

#6253 assigned enhancement

[API3] - Implement mapindex to gamepos.

Reported by: Freagarach Owned by: Phylogix
Priority: Should Have Milestone: Backlog
Component: AI Keywords: simple
Cc: Patch:

Description

There are a lot of [gameState.ai.HQ.territoryMap.cellSize * (territoryIndex % gameState.ai.HQ.territoryMap.width + 0.5), gameState.ai.HQ.territoryMap.cellSize * (Math.floor(territoryIndex / gameState.ai.HQ.territoryMap.width) + 0.5)] or equivalent calls throughout PetraAI. It would be nice to implement a, complementary to gamePosToMapPos, mapPosToGamePos in the map-module.js.

Mostly a search and replace, but it enhances the readability a lot.

Change History (6)

comment:1 by Freagarach, 3 years ago

Summary: (Petra)AI - Implement mapindex to gamepos.[(Petra)AI] - Implement mapindex to gamepos.

comment:2 by Silier, 3 years ago

Summary: [(Petra)AI] - Implement mapindex to gamepos.[API3] - Implement mapindex to gamepos.

comment:3 by Silier, 3 years ago

Keywords: simple removed
severity: simple

comment:4 by Silier, 3 years ago

Keywords: simple added

comment:5 by Freagarach, 2 years ago

Milestone: Alpha 26Backlog

comment:6 by Phylogix, 7 months ago

Owner: set to Phylogix
Status: newassigned
Note: See TracTickets for help on using tickets.