Accuracy

The accuracy of a single shot is determined by multiple factors:

First, the weapon is aimed at a specific tile.

Then, the following formula is done for both x- and y-axis to get the final tile the shot will hit:

distance: is simply the distance to the intended target in tiles.

inaccuracy: the total inaccuracy of the ship (affected by crow's nest, telescope & targeting computer)

fireModeInaccuracyFactor: 0.5, 1, 2 depending on the set Fire Mode

fixedInaccuracy:

gaussian: A random value between -1 and 1 with values closer to 0 being more likely

Also, the the following shots get closer to the last one so the shots seem less random and more natural.