chorhatarahuduketuri / gc

GalacticConquest
0 stars 0 forks source link

Design game logic. Also implement it. #6

Closed yurigotskoff closed 5 years ago

adrianlshaw commented 11 years ago

This sounds too generic. Details please.

chorhatarahuduketuri commented 6 years ago

I think that the model package should contain only descriptions of things that exist. There should then be a mechanics package that does things to them.

For example, when a ship wants to move, it should contain data on where it want's to go. During turn processing, when that sector is being dealt with, that ship is checked to see if it's location and destination are the same, if not, it is moved by the mechanics code.

This may seem convoluted, but it allows for different ship types and races to move in different ways without having to have duplicated path finding code, as well as allowing for ships to automatically avoid black holes/forbidden territory without code within the ship class having to go out and find out who it is in relation to all the sectors around it, what's in them, and what the relationships are - the code in the mechanics package can do it all in one place from one point.

chorhatarahuduketuri commented 6 years ago

See pull request #37

chorhatarahuduketuri commented 5 years ago

I've realised this is a dumb issue and won't result in anything specific that is useful, other than discussions which we've already had.